2007 May 21 6:47 AM
how to set resolution in table control of bdc . i know that there is one structure for this ctu_params we have to use in the syntax of call transaction
but how to to use it pls give some sample code .
example
call trans xk01 using bdc data mode a options
how shoild i use this options pls tell anser
how to set resolution in table control of bdc . i know that there is one structure for this ctu_params we have to use in the syntax of call transaction
but how to to use it pls give some sample code .
example
call trans xk01 using bdc data mode a options
how shoild i use this options pls tell anser
2007 May 21 6:50 AM
Hi,
see this code.
report ZBHCALLTRAN no standard page heading line-size 255.
DATA:BEGIN OF ITAB OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
EKORG LIKE RF02K-EKORG,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
REGIO LIKE LFA1-REGIO,
WAERS LIKE LFM1-WAERS,
END OF ITAB.
DATA BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:/BHARAT/BDC.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = ITAB.
LOOP AT ITAB.
perform bdc_dynpro using 'SAPMF02K' '0107'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-LIFNR'.
perform bdc_field using 'RF02K-LIFNR'
ITAB-LIFNR.
perform bdc_field using 'RF02K-EKORG'
ITAB-EKORG.
perform bdc_field using 'RF02K-KTOKK'
ITAB-KTOKK.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-NAME1'.
perform bdc_field using 'LFA1-NAME1'
ITAB-NAME1.
perform bdc_field using 'LFA1-SORTL'
ITAB-SORTL.
perform bdc_field using 'LFA1-LAND1'
ITAB-LAND1.
perform bdc_field using 'LFA1-REGIO'
ITAB-REGIO.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'LFM1-WAERS'
ITAB-WAERS.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'MK01' USING BDCTAB MODE 'A' UPDATE 'S'.
REFRESH BDCTAB.
ENDLOOP.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCTAB.
BDCTAB-PROGRAM = PROGRAM.
BDCTAB-DYNPRO = DYNPRO.
BDCTAB-DYNBEGIN = 'X'.
APPEND BDCTAB.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCTAB.
BDCTAB-FNAM = FNAM.
BDCTAB-FVAL = FVAL.
APPEND BDCTAB.
ENDFORM.
rgds,
bharat.
2007 May 21 6:54 AM
Hello Hari,
Please find the code below.
data: ls_ctu_params like ctu_params.
ls_ctu_params-defsize = 'X'.
ls_ctu_params-dismode = 'N'.
ls_ctu_params-updmode = 'S'.
call transaction 'XXXX' using gt_bdcdata
options from ls_ctu_params
messages into gt_bdcmsgs .
if sy-subrc <> 0.
endif.
Hope this helps you.
Reward if found useful.
Regards,
Prakash Ghantasala
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |