on 12-15-2008 8:15 AM
HI All,
I have the folloeing code:
DATA: l_bukrs TYPE t001k-bukrs,
l_rcomp TYPE t880-rcomp.
READ TABLE i_vbdpl INDEX 1 INTO wa_vbdpl.
SELECT SINGLE bukrs
FROM t001k
INTO l_bukrs
WHERE bwkey = wa_vbdpl-werks.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_bukrs
IMPORTING
output = l_rcomp.
SELECT SINGLE name1
FROM t880
INTO g_name1
WHERE rcomp = l_rcomp.
ENDIF.
Here only name1 is being printed, but i need name1 and name2 be concatinated and printed in the form,
How do I go about this??
Thanks,
Debrup.
Hi Debrup Chatterjee,
DATA: L_BUKRS TYPE T001K-BUKRS,
L_RCOMP TYPE T880-RCOMP.
READ TABLE I_VBDPL INDEX 1 INTO WA_VBDPL.
SELECT SINGLE BUKRS
FROM T001K
INTO L_BUKRS
WHERE BWKEY = WA_VBDPL-WERKS.
Declare variables...
DATA : G_NAME1 TYPE T880-NAME1,
G_NAME1 TYPE T880-NAME2,
FULL_NAME(60) TYPE C.
IF SY-SUBRC = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = L_BUKRS
IMPORTING
OUTPUT = L_RCOMP.
Modify select stament and use concatenate after it as below...
SELECT SINGLE NAME1 NAME2
FROM T880
INTO (G_NAME1, G_NAME2)
WHERE RCOMP = L_RCOMP.
CONCATENATE G_NAME1 G_NAME2 INTO FULL_NAME SEPARATED BY SPACE.
CONDENSE FULL_NAME.
WRITE : / FULL_NAME.
ENDIF.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please Post ur queries in right Forum , this forum is for form printing ur query is more suited to Abap general.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rest all is correct..Just do the following
First of all fetch both name1 and name2
SELECT SINGLE name1 name2
FROM t880
INTO (g_name1, g_name2)
WHERE rcomp = l_rcomp.
Then USE
CONCATENATE g_name1 g_name2 INTO g_name SEPARATED BY SPACE.
This will help!!
Regards,
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this statement:
CONCATENATE G_NAME1 G_NAME2 into G_NAME SEPARATED BY A SPACE.
don't forget to declare these two variables.
before using above statement of concatenation make a change in select statement like this:
SELECT SINGLE name1 name2
FROM t880
INTO (g_name1, g_name2)
WHERE rcomp = l_rcomp.
Hope it helps.
Regards,
Rahul
Edited by: Rahul Kumar Sinha on Dec 15, 2008 9:46 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.