05-11-2006 1:26 PM
how can i concatenate the purchase document no (EKPO-EBELN) and item number (EKPO-EBELP) into a variable of type THEAD-TDNAME so that i can pass that variable into the FM 'READ_TEXT' .
when i try , it doest concatenate cuz EKPO-EBELN is a CHAR and EKPO-EBELP is a NUMC .
plz help me out..
05-11-2006 1:31 PM
05-11-2006 1:29 PM
hii
use concatenate
i tried it .it is working.
DATA :V_EBELN LIKE EKPO-EBELN ,
V_EBELP LIKE EKPO-EBELP ,
V_1 TYPE THEAD-TDNAME .
V_EBELN = 4500000000 .
V_EBELP = 01025 .
CONCATENATE V_EBELN V_EBELP INTO V_1.
WRITE:/ V_1 .
hope this helps
Thanks & Regards
Naresh
05-11-2006 1:30 PM
First make:
data: lc_ebelp(5) TYPE c.
write ekpo-ebelp to lc_ebelp.
concatenate ekpo-ebeln lc_ebelp into THEAD-TDNAME.
Regards.
05-11-2006 1:30 PM
Hi,
Use a temporary CHAR field to store content of EKPO-EBELP and then concatenate the two in THEAD-TDNAME.
That should be OK that way.
Best regards,
Guillaume
05-11-2006 1:30 PM
DATA : V_POSNR(6) TYPE C.
WRITE 😕 EKPO-POSNR TO v_posnr.
then use concatenate
concatenate EKKO-EBELN
V_POSNR
INTO V_TDOBJECT.
05-11-2006 1:38 PM
Hi,
Try this piece of code,
Data : V1 like EKPO-EBELN VALUE '4300069136',
V2 LIKE EKPO-EBELP VALUE '00010',
V3 LIKE THEAD-TDNAME.
CONCATENATE V1 V2 INTO V3.
WRITE V3.
Hope it may help.
Thanks,
Mayank
05-11-2006 1:31 PM
05-11-2006 1:32 PM
hi
data : v_ebelp type string.
v_ebelp = ekpo-ebelp.
concatenate ekpo-vbeln v_ebelp into v_ebelp.
plz reward helpful posts
05-11-2006 1:33 PM
This code works just fine.
tables: ekko, ekpo, thead.
select single * from ekko.
select single * from ekpo where ebeln = ekko-ebeln.
concatenate ekko-ebeln ekpo-EBELP into thead-tdname.
write:/ thead-tdname.
CONCATENATE handles CHAR and NUMC just fine. Your issue is elsewhere.
What error are you receiving?
05-11-2006 1:56 PM
Hi John,
i am doing,
concatenate ekko-ebeln ekpo-EBELP into txt.
where 'txt' is of type THEAD-TDNAME
i am getting a dialog box displaying that the FM 'READ_TEXT' cant accept '450000001700000'
where 4500000017 is ekko-ebeln , but ekpo-ebelp is 00000
??
05-11-2006 2:03 PM
Shehryar,
"00000" is not a valid value for EKPO-EBELP.
Please post your code for review.
05-11-2006 2:09 PM
Data: txt TYPE THEAD-TDNAME,
mpotext TYPE string.
Types: ty_textobject type standard table of tline.
Data: itab TYPE TY_TEXTOBJECT,
wa_itab TYPE TLINE.
concatenate ekko-ebeln ekpo-EBELP into txt.
CALL FUNCTION 'READ_TEXT' " FM Read_text
EXPORTING
ID = 'F03'
LANGUAGE = 'E'
NAME = txt
OBJECT = 'EKPO'
TABLES
LINES = itab
EXCEPTIONS
ID = 1.
IF SY-SUBRC <> 0.
ENDIF.
LOOP at itab into wa_itab.
mpotext = wa_itab-tdline.
endloop.
05-11-2006 2:13 PM
Please include the code that populates EKKO-EBELN and EKPO-EBELP.
Also - Is your dialog box (error message) at compilation ? Or at run-time?
05-11-2006 2:15 PM
05-11-2006 2:22 PM
Please include the code that populates EKKO-EBELN and EKPO-EBELP.
A value of '00000' in EKPO-EBELP is incorrect.
05-11-2006 2:35 PM
Shehryar,
I am confused. You said that the error is a compile error.
However, you have values for EKKO-EBELN and EKPO-EBELP.
Are these "hard-coded" into your source code?
05-11-2006 5:31 PM
Shehryar,
Where do you stand with this? Need more help still?
If yes, please provide the additional info cited.
If not, please reward points accordingly and close the thread.
Thanks!!
05-13-2006 9:25 PM
Thanks John and everyone else,
i had to write the value after the table loop .. thanks.