03-09-2009 9:14 AM
Sir,
I am uploading vendor master ( xk01) with BDC session method.But I have query while uploading
Withholding tax accounting records. ( there 4 to 5 records in with/ tax information on screen no 0610)
can any one tell me how to upload muliple records on same sreen.
Manoj..
03-09-2009 9:44 AM
Hi Manoj,
When your appending the first record there will be (01) in a particular field your entering something lik this.
PERFORM bdc_field USING ''KNVK-NAME1(01)'
So you change it like this.
CONCATENATE 'KNVK-NAMEV(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-namev . "'fdsa'.
CLEAR w_word .
CONCATENATE 'KNVK-NAME1(' w_var ')' INTO w_word .
Here w_var will keep incrementing and so are your records.
Use at new or on change of and in those control break statements write the logic.
Much Regards,
Amuktha.
03-09-2009 9:46 AM
Here is my sample code.
LOOP AT t_custxl INTO fs_custxl.
ON CHANGE OF fs_custxl-name1 .
PERFORM bdc_dynpro USING 'SAPMF02D' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02D-BUKRS'
fs_custxl-bukrs . " '1000'.
PERFORM bdc_field USING 'RF02D-KTOKD'
fs_custxl-ktokd . "'CUST'.
PERFORM bdc_field USING 'RF02D-REF_KUNNR'
''.
PERFORM bdc_dynpro USING 'SAPMF02D' '0110'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KNA1-ANRED'
fs_custxl-anred . "'Mr.'.
PERFORM bdc_field USING 'KNA1-NAME1'
fs_custxl-name1 . "'asdf'.
PERFORM bdc_field USING 'KNA1-SORTL'
fs_custxl-sortl . "'ASDF'.
PERFORM bdc_field USING 'KNA1-PFACH'
fs_custxl-pfach . "'500017'.
PERFORM bdc_field USING 'KNA1-ORT01'
fs_custxl-ort01 . "'hyderabad'.
PERFORM bdc_field USING 'KNA1-PSTLZ'
fs_custxl-pstlz . "'500017'.
PERFORM bdc_field USING 'KNA1-PSTL2'
fs_custxl-pstl2 . "'500017'.
PERFORM bdc_field USING 'KNA1-LAND1'
fs_custxl-land1. "'in'.
PERFORM bdc_field USING 'KNA1-SPRAS'
fs_custxl-spras. "'en'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0120'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0125'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0130'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0340'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0370'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'KNA1-CIVVE'
'X'.
ENDON .
ADD 1 TO w_var .
PERFORM bdc_dynpro USING 'SAPMF02D' '0360'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
CLEAR w_word .
CONCATENATE 'KNVK-NAMEV(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-namev . "'fdsa'.
CLEAR w_word .
CONCATENATE 'KNVK-NAME1(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-kname1 . .
CLEAR w_word .
CONCATENATE 'KNVK-TELF1(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-telf1 .
CLEAR w_word .
CONCATENATE 'KNVK-ABTNR(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-abtnr .
AT END OF name1 .