11-18-2005 8:38 AM
Hi,
Iam trying to create bdc field numbers (ex:VBEP-WMENG(02))
dynamically.While doing this bdcquotes are missing.
example:perform bdc_field using 'VBEP-WMENG(02)'
Iam trying to add '''(quote between quotes).But it is not accepting... and double quotes are no use ('"').
Is there any other way to do this....see the example...
I want to add single quotes....
points guaranteed...
loop at t_date.
loop at t_vbbe.
loop at t_det.
num = sy-tabix.
concatenate t_det-mbdat6(2) '.' t_det-mbdat4(2) '.'
t_det-mbdat+0(4) '.' into mbdat.
if t_det-mbdat = t_date-edatu.
if t_det-mbdat = t_vbbe-mbdat.
Concatenate '"' 'RV45A-ETDAT' '(' '0' num ')' '"' into vdat.
Concatenate '"' 'VBEP-WMENG' '(' '0' num ')' '"' into vmeng.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' vdat.
Perform bdc_field using vdat mbdat.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' vmeng.
Perform bdc_field using vmeng t_det-omeng.
endif.
clear: vdat, num, vmeng.
endloop.
endloop.
cheers
kaki
11-18-2005 8:46 AM
Hi
You can use this code:
Concatenate '''RV45A-ETDAT' '(' '0' ')''' into field.
Now the value of FIELD is 'RV45A-ETDAT(0)'
But I believe you don't need quotes, the value of field should be RV45A-ETDAT(0).
Max
Message was edited by: max bianchi
Message was edited by: max bianchi
11-18-2005 9:19 AM
Hi,
You need not add quotes for the variable.
perform bdc_field using 'BDC_CURSOR' 'RV45A-ETDAT(0)'.
perform bdc_field using 'BDC_CURSOR' vdat.
If you are specifying the strings instead of vdat then we need quotes. As now you are using variable in place of strings, quotes are not required.
Just say,
concatenate 'RV45A-ETDAT(' num ')' into vdat.
**Dont forget to declare num as numeric.
Regards,
Sailaja.
11-18-2005 9:59 AM
Hi Please use the following code to get the single quotes.
concatenate '''' VBEP-WMENG(02) into v_string.
conatenate v_string '''' into v_string.
it should help u.
Satish
11-18-2005 10:22 AM
Hi Kaki,
Use this simple code...
CONCATENATE 'VBEP-WMENG(' l_itemno ')' INTO l_str.
where l_itemno will be having values like 01, 02 etc...
Regards,
Raj