BDC Call Tran - mm01
BDC Call Tran - mm01
BDC Call Tran - mm01
PERFORM f_get_data.
*&---------------------------------------------------------------------*
*&
Form f_get_data
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
FORM f_get_data .
*
*
*
*
*
*
*
ENDFORM.
" f_get_data
*&---------------------------------------------------------------------*
*&
Form f_get_bdc
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
FORM f_get_bdc .
LOOP AT it_final INTO wa_final.
REFRESH it_bdcdata[].
PERFORM bdc_dynpro
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_dynpro
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_dynpro
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_dynpro
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_dynpro
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_dynpro
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_field
PERFORM bdc_dynpro
PERFORM bdc_field
'M'.
USING 'RMMG1-MTART'
'MPO'.
USING 'SAPLMGMM' '0070'.
USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(09)'.
USING 'BDC_OKCODE'
'=ENTR'.
USING 'MSICHTAUSW-KZSEL(01)'
'X'.
USING 'MSICHTAUSW-KZSEL(02)'
'X'.
USING 'MSICHTAUSW-KZSEL(09)'
'X'.
USING 'SAPLMGMM' '0080'.
USING 'BDC_CURSOR'
'RMMG1-WERKS'.
USING 'BDC_OKCODE'
'=ENTR'.
USING 'RMMG1-WERKS'
wa_final-werks.
USING 'SAPLMGMM' '4004'.
USING 'BDC_OKCODE'
'/00'.
USING 'MAKT-MAKTX'
wa_final-maktx."'mech'.
USING 'BDC_CURSOR'
'MARA-MEINS'.
USING 'MARA-MEINS'
wa_final-meins."'kg'.
USING 'SAPLMGMM' '4004'.
USING 'BDC_OKCODE'
'/00'.
USING 'BDC_CURSOR'
'MAKT-MAKTX'.
USING 'MAKT-MAKTX'
'mech'.
USING 'SAPLMGMM' '4000'.
USING 'BDC_OKCODE'
'/00'.
USING 'BDC_CURSOR'
'MAKT-MAKTX'.
USING 'MAKT-MAKTX'
'mech'.
USING 'MARA-MEINS'
'KG'.
USING 'MBEW-BKLAS'
'3300'.
USING 'MBEW-VPRSV'
wa_final-VPRSV."'S'.
USING 'MBEW-PEINH'
'1'.
USING 'SAPLSPO1' '0300'.
USING 'BDC_OKCODE'
'=YES'.
"'0006'.
ENDIF.
ENDLOOP.
IF NOT it_msg1 IS INITIAL.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
I_HTML_HEIGHT_TOP
= 0
I_HTML_HEIGHT_END
= 0
IT_ALV_GRAPHICS
=
IT_HYPERLINK
=
IT_ADD_FIELDCAT
=
IT_EXCEPT_QINFO
=
IR_SALV_FULLSCREEN_ADAPTER
=
IMPORTING
E_EXIT_CAUSED_BY_CALLER
=
ES_EXIT_CAUSED_BY_USER
=
TABLES
t_outtab
= it_msg1
EXCEPTIONS
program_error
= 1
OTHERS
= 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM.
" f_get_bdc
*----------------------------------------------------------------------*
*
Start new screen
*
*----------------------------------------------------------------------*
FORM bdc_dynpro USING program dynpro.
CLEAR wa_bdcdata.
wa_bdcdata-program = program.
wa_bdcdata-dynpro = dynpro.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO it_bdcdata.
ENDFORM.
"BDC_DYNPRO
*----------------------------------------------------------------------*
*
Insert field
*
*----------------------------------------------------------------------*
FORM bdc_field USING fnam fval.
IF fval <> space.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = fnam.
wa_bdcdata-fval = fval.
APPEND wa_bdcdata TO it_bdcdata.
ENDIF.
ENDFORM.
"bdc_field