Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Recording the second line item

Former Member
0 Kudos

Hi all

I am uploading the transaction data's for FB70 Transaction,Can any one please tell me how to record the second the line item and what is the function code we have to add in our BDC Program to upadate the consecutive line item detailS

Thanks

AJ

2 REPLIES 2

Former Member
0 Kudos

Hi

Even if u record one line item also.it is enough... but you have to make the following changes in the program to take more than one line item:

data:fnaml(20) type c,
                id type string.
move 1 to id.
*
    loop at TI_STAGING WHERE VENDOR = IT_STAGING-VENDOR AND DOCDATE = IT_STAGING-DOCDATE.

      concatenate 'RM06E-EPSTP(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-itmcategory.

      concatenate 'EKPO-KNTTP(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-accassignment.

      concatenate 'EKPO-EMATN(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-material.

      concatenate 'EKPO-TXZ01(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-shortxt.

      quan = ti_staging-poqty.
      concatenate 'EKPO-MENGE(0' id ')' into fnam.
      perform bdc_field       using fnam quan.

      concatenate 'RM06E-EEIND(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-deliverydate.

    

      concatenate 'EKPO-NETPR(0' id ')' into fnam.
      perform bdc_field       using fnam netpr.

      concatenate 'EKPO-MATKL(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-mategroup.

      concatenate 'EKPO-WERKS(0' id ')' into fnam.
      perform bdc_field       using fnam TI_STAGING-plant.

      ID = ID + 1.
*
    ENDLOOP.

Regards,

Vishwa.

Former Member
0 Kudos

Tnx