Skip to Content
0
Former Member
Dec 11, 2008 at 05:11 AM

BDC of VF01 multiple lin item

38 Views

Hi all there,

I am writing a BDC for multiple delivery number but with the follwing code i am able to append only first delivery numeber.

here I have given a part of code only

LOOP AT ITAB.

CONCATENATE 'KOMFK-VBELN' '( ' zero ' ' V_INDEX ')' INTO V_VBELN.

PERFORM DYNPRO_PROCESS USING:

'X' 'SAPMV60A' '0102',

' ' 'BDC_CURSOR' V_VBELN, "'KOMFK-VBELN(1)', "V_VBELN,

' ' V_VBELN ITAB-VBELN.

V_INDEX = V_INDEX + 01.

ENDLOOP.

PERFORM DYNPRO_PROCESS USING:

'X' 'SAPMV60A' '0102',

' ' 'BDC_OKCODE' '=FAKT'.

PERFORM DYNPRO_PROCESS USING:

'X' 'SAPMV60A' '0104',

' ' 'BDC_OKCODE' '=SICH'.

CALL TRANSACTION 'VF01' USING BDCDATA

MODE V_MODE

UPDATE 'S'

MESSAGES INTO MESSTAB.

FORM DYNPRO_PROCESS USING DYNBEGIN FLD1 FLD2.

IF DYNBEGIN = 'X'.

  • REFRESH BDCDATA.

CLEAR BDCDATA .

MOVE: DYNBEGIN TO BDCDATA-DYNBEGIN ,

FLD1 TO BDCDATA-PROGRAM ,

FLD2 TO BDCDATA-DYNPRO.

APPEND BDCDATA .

ELSE.

  • REFRESH BDCDATA.

CLEAR BDCDATA .

MOVE: FLD1 TO BDCDATA-FNAM ,

FLD2 TO BDCDATA-FVAL .

APPEND BDCDATA.

ENDIF.

ENDFORM. "DYNPRO_PRO

Regards

Sagar