Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how do i call a new Text name for a new Order/notification.(PM/ABAP)

bryanjacobs
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

former_member187748
Active Contributor
0 Kudos

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.

10 REPLIES 10

former_member187748
Active Contributor
0 Kudos

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.

0 Kudos
HIE

Data : txt_name type QMEL-QMNUM.

SELECT qmnum

FROM qmel

INTO txt_name

WHERE AUFNR = 100000000080.

ENDSELECT.

DEFECTS_RAISED = TXT_NAME.

0 Kudos

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

0 Kudos

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.

0 Kudos

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:

0 Kudos

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:

0 Kudos

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

0 Kudos

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.

former_member187748
Active Contributor
0 Kudos

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.

0 Kudos

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.