Friday, 15 May 2015

Create transport request


image

How to add column on popup message log


image
DATA: gs_log          TYPE bal_s_log,
      gt_log          TYPE bal_t_logh,
      gs_log_handle   TYPE balloghndl,
      gs_msg          TYPE bal_s_msg,
      gt_msg          TYPE bal_t_msgh,
      gs_disp_profile TYPE bal_s_prof,
      gs_fcat TYPE bal_s_fcat,
      gs_context type ZPP_ORD_OPER.

________________________________________________________________________
FORM create_log .
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
      i_s_log      = gs_log
IMPORTING
      e_log_handle = gs_log_handle.
ENDFORM.                    " CREATE_LOG

________________________________________________________________________
FORM log_msg_add  USING    value(p_msgty)
value(p_msgid)
value(p_msgno)
value(p_msgv1)
value(p_msgv2)
value(p_msgv3)
value(p_msgv4).
CLEAR: gs_msg.
  gs_msg-msgty = p_msgty.
  gs_msg-msgid = p_msgid.
  gs_msg-msgno = p_msgno.
  gs_msg-msgv1 = p_msgv1.
  gs_msg-msgv2 = p_msgv2.
  gs_msg-msgv3 = p_msgv3.
  gs_msg-msgv4 = p_msgv4.
 
gs_context-order = v_order.
  gs_context-operation = v_oper.
  gs_msg-context-value = gs_context.
  gs_msg-context-tabname = 'ZPP_ORD_OPER'.

CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
      i_s_msg = gs_msg.
ENDFORM.                    " LOG_MSG_ADD

________________________________________________________________________
FORM show_log .
*------Set Popup Screen------
CALL FUNCTION 'BAL_DSP_PROFILE_POPUP_GET'
EXPORTING
      start_col           = 5
      start_row           = 5
      end_col             = 120
      end_row             = 25
IMPORTING
      e_s_display_profile = gs_disp_profile.
  gs_disp_profile-use_grid ='X'.

CLEAR gs_fcat.
  gs_fcat-ref_table = 'ZPP_ORD_OPER'.
  gs_fcat-ref_field = 'ORDER'.
  gs_fcat-col_pos = 0.
APPEND gs_fcat TO gs_disp_profile-mess_fcat.
  gs_fcat-ref_table = 'ZPP_ORD_OPER'.
  gs_fcat-ref_field = 'OPERATION'.
  gs_fcat-col_pos = 1.
APPEND gs_fcat TO gs_disp_profile-mess_fcat.

*------Display Log-----------
CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
EXPORTING
      i_s_display_profile = gs_disp_profile
      i_t_log_handle      = gt_log
      i_t_msg_handle      = gt_msg.
ENDFORM.                    " SHOW_LOG

________________________________________________________________________
FORM clear_log .
CALL FUNCTION 'BAL_LOG_MSG_DELETE_ALL'
EXPORTING
      i_log_handle = gs_log_handle.
ENDFORM.                    " CLEAR_LOG

________________________________________________________________________






Friday, 20 March 2015

How to create Purchase requisition (PR)


Call Transaction : ME51N. (Create Purchase Requisition)
Input Data :
Acct Assignment Cat. : U (Unknown)
Material : Select material but if have not material you space.
Short Text : Input Brand, Model, Description and spec anything.
Quantity : Input quantity.
Order Unit : Select unit of measure for order.
Delivery Date : Select date on which the goods are to be delivered.
Material Group : Select ZASSET or ZSERVICE.
Plant : Select plant (3000).
Purchasing Group : Select 30 Namfon S.
Requested By : Youe name.
Purch. Organization : Select plant (3000).
Val. Price : Key price of the requested material per price unit.

Tab Texts > Item text : Key your cost center.

and save requisition and copy PR number.
Call Transaction : ZMM01 (Print or Display Purchase Requisition)
1. Input PR number in Purchase Requisition.
2. Checkbox Print Now..
3. Execute.

Thursday, 20 November 2014

Popup message log

 

Step 1 : Call Function 'BAL_LOG_CREATE'

Step 2 : Call Function 'BAL_LOG_MSG_ADD'

Step 3 : Call Function 'BAL_DSP_PROFILE_POPUP_GET'

Step 4 : Call Function 'BAL_DSP_LOG_DISPLAY'

Step 5 : Delete message Call Function 'BAL_LOG_MSG_DELETE_ALL'

Tuesday, 4 November 2014

Generated Table for View

Table : TRDIR

ใช้สำหรับเช็คข้อมูลโปรแกรม คลาส ฟังก์ชั่น ฯลฯ ว่าใครเป็นคนสร้าง สร้างเมื่อไหร่ ที่ไหน เป็นต้น