‎2011 Feb 10 9:49 AM
Dear Gurus,
As with my previous problem, I am now getting value from SAP Directory in AL11. But problem is-
1. When I try to get Quantity or Currency field, it shows runtime error while uploading in App. Server. So, I used Char data type variable to store currency field and concatenate these in a string type variable.
LOOP AT it_mseg INTO wa.
move it_mseg-erfmg to amount. " amount is a char type variable.
CONCATENATE it_mseg-mblnr it_mseg-mjahr it_mseg-matnr amount it_mseg-werks it_mseg-lgort INTO ld_string.
TRANSFER ld_string to filename.
But I am getting only 0 for all the records. If I directly transfer wa to filename, it shows values. But when i am passing string, all value shows 0. Plz give me solution.
Thanks,
With regards,
Tripod.
‎2011 Feb 10 10:36 AM
Hi,
use
WRITE it_mseg-erfmg to amount.
or, assuming that the currency is WW_WAERS,
WRITE it_mseg-erfmg CURRENCY WW_WAERS to amount.
‎2011 Feb 10 10:49 AM
Thanks Henry for reply. I think error is in concatenate into a string. Because when I exclude this amount field and try to concatenate in string, then also value shows all 0.
Plz give some logic to solve it.
With regards,
Tripod.
‎2011 Feb 10 11:28 AM
using a MOVE from a numeric field, you are copying the field in internal format and it may cause problems. With the WRITE statement, the numeric field is converted in text field.
‎2011 Feb 13 3:55 AM
Hi Henri,
Thanks for your reply. I tried using write statement also. But problem remains the same. Finally I kept them in another internal table,by making required field as char, now data showing properly .
Thanks,
Best regards,
Tripod.
‎2011 Feb 10 11:00 AM