01-13-2014 10:48 AM
Hie guys
I used include text to display a notification field on my report as shown below.
WHEN I ENTER A DIFFERNT ORDER NUMBER THE DESCRIPTION IS THE SAME
i know the text name should be dynamic with && but how can i include the long text in a select statement when i do not know
the location of the tables that carry the long texts.
when i used F1 it told me the long text is in structures
so how and where can i first put a select statement that checks to see if its the appropriate defect for that notification??
regrards
bryan jacobs
01-13-2014 10:56 AM
Hi Brayan,
in the text name you have passed a static value, so it is displaying result for it.
Just do it as shown below, in text name as you have shown , see what values are there,
means lets say, you have a po having field ebeln with value 0000012, and its line item ebelp
having values 80, then it will get concatenated as 000001280
So you can see we have one value , so like this please see in the text name fields what values are
there. then loop in your internal table and concatenate both the values, and put it in a variable
say vnam, please create a variable with the same name and pass it to the text name,
you will get what you wants, otherwise revert back, if stills you have problems.
01-13-2014 10:56 AM
Hi Brayan,
in the text name you have passed a static value, so it is displaying result for it.
Just do it as shown below, in text name as you have shown , see what values are there,
means lets say, you have a po having field ebeln with value 0000012, and its line item ebelp
having values 80, then it will get concatenated as 000001280
So you can see we have one value , so like this please see in the text name fields what values are
there. then loop in your internal table and concatenate both the values, and put it in a variable
say vnam, please create a variable with the same name and pass it to the text name,
you will get what you wants, otherwise revert back, if stills you have problems.
01-13-2014 4:07 PM
Sanjeev Kumar your answer was helpul
though i cant seem to understand why you want me to concertenate
but THANKS TO YOUR SUGGESTION I MANAGED TO FIND A COLUMN IN THE TABLE QMEL WHERE THE TEXTNAMES ARE STORED AND ALSO A COLUMN FOR THE ORDER NUMBERS AS SHOWN above...
so i have inserted this select statement in my smartform to get the textname number using the captured order number(AUFNR)
Data : txt_name type QMEL-QMNUM.
SELECT qmnum
FROM qmel
INTO txt_name
WHERE AUFNR = 100000000080.
ENDSELECT.
DEFECTS_RAISED = TXT_NAME.
im having one slight challenge i need to find where the order number has been used(CAPTURED) in the smartform
but the only place where the order number was used is represented in the format below:
&ORDER_DATA-ORDER_HEADER-ORDERID&
AND I THINK THIS VARIBLE IS WHERE MY ORDER NUMBER IS DISPLAYED BUT I CANT INSERT IT INTO MY ABAP BECAUSE ITS GIVING ME ERRORS.
PLIZ HELP
01-13-2014 4:39 PM
Hi Bryan
You will have use this order number only to fetch all notifications from QMEL table. What error does it give you..? You will need to code it in programming lines
Nabheet
01-14-2014 5:13 AM
Hi Brayan,
i have just told , you how to use text via include text, it has nothing to do with your data (see my message, i have taken two variable ebeln and ebelp, and i have to pass it after concatenation, to read the text).
You have not to do such things, now comes to your queries now, so you have to add this variable in your program
ORDER_DATA-ORDER_HEADER-ORDERID
i hope, you are not confused with &&, this are commands used to fetch data in smartforms,.
Please let me know, if you have any problem instead, and show your error message.
01-14-2014 8:28 AM
Morning madan thank your for your patience
I have created a new variable and declared it as a import parameter in the hope that i want it to hold the current order number when the smart-form report is run but i'm getting an error
Below is a code snippet:
01-14-2014 8:28 AM
Morning sanjeev thank your for your patience
I have created a new variable and declared it as a import parameter in the hope that i want it to hold the current order number when the smart-form report is run but i'm getting an error
Below is a code snippet:
01-14-2014 8:32 AM
Bryan
In your driver program pass this ORDER_NUM that is why dump is coming. Seconldy in the code under input parameters put order_num so that order-num is available. It is like a subroutine with using parameter
Nabheet
01-14-2014 8:42 AM
Hi Brayan,
please check , have you put order_num in input parameters , just left where you have shown
DEFECTS, in that input parameters, you have to write order_num, so that it can used as an
input parameter, as you have used.
One thing more , as Nabheet has sujjested, please check that you have used order_num in your
driver program, and exported it through smartform calling.
If you haven't declared it within your report program, and didn't have exported while calling smartform
it will gives error while declaring it in import secion in form interface.
So please check that you have imported it in smartform properly.
01-13-2014 11:12 AM
Hi Brayan,
see how i am using it, here i have to pass the concatenated value of ebeln and ebelp.
For this i have created a variable named v_nam, as shown below.
DATA : v_nam LIKE thead-tdname,
LOOP AT it_EKPO INTO wa_EKPO.
CONCATENATE WA_EKPO-EBELN WA_EKPO-EBELP INTO V_NAM.
ENDLOOP.
Now i will pass the value v_nam in text nane as &v_nam&
and it will give me the text for all line items, or whatsoever it is.
01-16-2014 8:49 AM
hie sanjeev
i had to do some reading and i later realized that your solution to Loop and concatenate was the easiest.
my solution of using a select also worked though.
thanx so much
sorry i took long to understand it.
regards
bryan.