‎2010 Sep 27 5:56 PM
Hi sap gurus,
I have an issue to read text function module.
My text name is shown as matnr 9 spaces then sales org and distribution channel.
Eg 400001542 100070
I am unable to concatenate this as text name .How to try this give me some suggestions.
Thanks
‎2010 Sep 27 7:26 PM
u can use the following:
move matnr to variable
move vkorg to variable+18(4)
move vtweg to variable+22(2)
‎2010 Sep 27 7:19 PM
Hi Sriram:
Is not clear for me all your explanation, please paste some code about your program, otherwise help you is hard.
One propousal:
DATA: TEXT(72) C.
CONTATENATE ITAB-MATNR ITAB-VKORG ITAB-VTWEG INTO TEXT SEPARATE BY '/'.
Don't work for you this piece of code?
Regards
José Luis.
‎2010 Sep 27 7:24 PM
Can't be very difficult...:-
lt_header-tdname = lv_matnr.
lt_header-tdname+17(4) = lv_vkorg.
lt_header-tdhane+21(2) = lv_vtweg.
‎2010 Sep 27 7:26 PM
u can use the following:
move matnr to variable
move vkorg to variable+18(4)
move vtweg to variable+22(2)
‎2010 Sep 27 7:31 PM
When in doubt, always go back and read the help files - the answer you require for CONCATENATE is right there...here's a clue - look at extra option #3.
‎2010 Sep 27 10:03 PM
Hi,
Actually, if I read the question correctly, the issue is that the material should be reformatted for output before being used in the concatenation and, therefore, concatenate may not be applicable because of the embedded spaces.
I would suggest something like...
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT' (Use the pattern button to get this - may need ALPHA not MATN1)
EXPORTING
INPUT = YOUR_MATNR_FIELD
IMPORTING
OUTPUT = LV_MATNR.
CLEAR L_TDNAME.
L_TDNAME = LV_MATNR.
L_TDNAME+18(4) = YOUR_VKORG.
L_TDNAME+22(2) = YOUR_VTWEG.
* Use resulting L_TDNAME as your text name
Hope I understood correctly.
Regards, Andy