on 04-16-2011 10:35 AM
Hi All,
I am using call transaction method for T code LT03. I am passing the data through an internal table which is having four records but when i run the BDC it is taking the data from the second line not from the first line. Can you please tell me what could be the problem in my code? Below I am attaching my code so have a look at it as well.
LOOP AT int_outtab3 INTO ws_outtab3 FROM ws_outtab3-verme.
PERFORM f_bdc_dynpro USING 'SAPML03T' '0151'.
PERFORM f_bdc_field USING 'BDC_CURSOR'
'*VBLKP-POSNR'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM f_bdc_field USING 'LTAK-LGNUM'
ws_outtab3-lgnum.
PERFORM f_bdc_field USING 'VBLKK-VBELN'
ws_outtab3-vbeln.
PERFORM f_bdc_field USING '*VBLKP-POSNR'
ws_outtab3-posnr.
PERFORM f_bdc_field USING 'RL03T-ALAKT'
c_charx.
PERFORM f_bdc_dynpro USING 'SAPML03T' '0105'.
PERFORM f_bdc_field USING 'BDC_CURSOR'
'T334T-LGTY0'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'=TAH2'.
PERFORM f_bdc_field USING 'T334T-LGTY0'
ws_outtab3-lgtyp.
PERFORM f_bdc_field USING 'T334T-LGTY1'
ws_outtab3-lgtyp.
PERFORM f_bdc_dynpro USING 'SAPML03T' '0102'.
PERFORM f_bdc_field USING 'BDC_CURSOR'
'LTAP-VLPLA'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM f_bdc_field USING 'RL03T-ANFME'
ws_outtab3-verme.
PERFORM f_bdc_field USING 'LTAP-ALTME'
ws_outtab3-meins.
PERFORM f_bdc_field USING 'LTAP-VLTYP'
ws_outtab3-lgtyp.
CALL FUNCTION 'CONVERSION_EXIT_LENUM_OUTPUT'
EXPORTING
input = ws_outtab3-lenum
IMPORTING
output = lw_lenum
EXCEPTIONS
t344_get_failed = 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.
PERFORM f_bdc_field USING 'LTAP-VLPLA'
ws_outtab3-lgpla.
PERFORM f_bdc_field USING 'LTAP-VLENR'
lw_lenum.
PERFORM f_bdc_dynpro USING 'SAPML03T' '0105'.
PERFORM f_bdc_field USING 'BDC_CURSOR'
'T334T-LGTY0'.
PERFORM f_bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM f_bdc_field USING 'T334T-LGTY0'
ws_outtab3-lgtyp.
PERFORM f_bdc_field USING 'T334T-LGTY1'
ws_outtab3-lgtyp.
*PERFORM BDC_TRANSACTION USING 'LT03'.
CALL TRANSACTION 'LT03' USING int_bdcdata
MODE lw_mde
UPDATE lw_mde
MESSAGES INTO lint_messtab.
In internal table int_outtab3 I have four records with the values in verme fields are 100, 75 , 3 and 2. But it start execution from 75. Please suggest me your valuable solutions. Thanks in advance.
Just refresh int_bdcdata after CALL TRANSACTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.