Skip to Content
0
Former Member
Jan 24, 2007 at 09:21 AM

AT NEW Command

19 Views

Dear All,

I am running a BDC for VK11. In my input file I am having Condition Type & Sales Org. At every new condition type I am saving the records. Now I want that for every new Condition Type & Sales Org combination the records should be saved.

Current code is defined below:

LOOP AT I_DATA_XLS.

AT NEW KSCHL.

FLAG1 = 'Y'.

ENDAT.

IF FLAG1 = 'Y'.

INT = 0.

PERFORM FILL_BDCDATA USING:

'X' 'SAPMV13A' '0100' ,

' ' 'BDC_CURSOR' 'RV13A-KSCHL' ,

' ' 'BDC_OKCODE' '/00' ,

' ' 'RV13A-KSCHL' I_DATA_XLS-KSCHL ,

'X' 'SAPMV13A' '1600' ,

' ' 'BDC_CURSOR' 'KOMG-VKORG' ,

' ' 'BDC_OKCODE' '/00' ,

' ' 'KOMG-VKORG' I_DATA_XLS-VKORG ,

'X' 'SAPMV13A' '1600' ,

' ' 'BDC_CURSOR' 'RV13A-DATAB(02)' ,

' ' 'BDC_OKCODE' '/00' .

FLAG1 = 'N'.

ENDIF.

How this can be done for a new combination.

Waiting for your replies

Warm Regards,

Nishu Jain.