Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Concatenating sy-tabix with field name

While doing BDC I need to concatenate the sy-tabix with the field as the BDC is on item level.

 LOOP AT request INTO wa_request.
    PERFORM dynpro USING:
        'X'     'SAPMV50A'              '1000',
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            'LIPS-POSNR('& sy-tabix &')',
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            'LIPS-POSNR(01)',
 ENDLOOP.

As you can see I am trying to concatenate the sy-tabix so it will appear as LIPS-POSNR(01) and then LIPS-POSNR(02) .. How to accomplish this. Thank you

Tags:
Former Member
replied

Try this one:

data l_tabix(2) type n,
l_field(30) type c.


 LOOP AT request INTO wa_request.
  l_tabix = sy-tabix. 
  CONCATENATE 'LIPS-POSNR(' l_tabix ')' INTO l_field.
    PERFORM dynpro USING:
        'X'     'SAPMV50A'              '1000',
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            l_field,
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            'LIPS-POSNR(01)',
 ENDLOOP.

Regards,

Naimesh Patel

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question