11-02-2007 3:48 PM
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
11-02-2007 3:54 PM
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
11-02-2007 3:51 PM
Hi,
Define a variable as below
data lv_tabix(2) type n.
Now
lv_tabix = sy-tabix.
CONCATENATE 'LIPS-POSNR(' lv_tabix ')' INTO <some variable>
Regards,
Atish
11-02-2007 3:53 PM
Why don't you concatenate before the perform statement and pass the variable to the perform.
Thanks,
Srinivas
11-02-2007 3:54 PM
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
11-02-2007 3:54 PM
Hi,
You need to use a specific field for that :
data : text_field(14) type c,
idx(2) type n.
idx = sy-tabix.
concatenate 'LIPS-POSNR(' idx ')' into text_field.
and then you can use it in your BDC coding :
PERFORM dynpro USING:
'X' 'SAPMV50A' '1000',
' ' 'BDC_OKCODE' '=CHSP_T',
' ' 'BDC_CURSOR' text_field,
' ' 'BDC_OKCODE' '=CHSP_T',
' ' 'BDC_CURSOR' 'LIPS-POSNR(01)',
Regards,
Nicolas.
11-02-2007 3:55 PM
Hi,
Please try this.
DATA: v_bdccur(30) type c,
LOOP AT request INTO wa_request.
clear v_bdccur.
v_bdccur = 'LIPS-POSNR(' sy-tabix ')'.
condense v_bdccur no-gaps.
PERFORM dynpro USING:
'X' 'SAPMV50A' '1000',
' ' 'BDC_OKCODE' '=CHSP_T',
' ' 'BDC_CURSOR' v_bdccur,
' ' 'BDC_OKCODE' '=CHSP_T',
' ' 'BDC_CURSOR' 'LIPS-POSNR(01)',
ENDLOOP.
Regards,
Ferry Lianto