cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the selected sales order line item number in NACE mail title?

former_member367551
Participant
0 Kudos

Dear forumers,

In the transaction NACE, a custom output type for Sales (V1) has been defined and under its 'Mail Title and Texts', a mail title has been defined as the following for the English language:-

"Error Order &VBAK-VBELN& &VBAP-POSNR& &VBAP-PSTYV&"

It was expected that &VBAP-POSNR& reflects the selected sales order line item; but the issue here is that the work area, &VBAP& always reflects the last sales order line item. &VBAK-VBELN& works fine. I have tried debugging this issue, but I am still unable to find a global data that carries the information on the selected sales order line item.

Might anyone have any experience on this and can perhaps shed some light on this matter, please? What can I otherwise do to resolve this issue? Appreciate any help here at all.

P/S:

I have found that the FM, REPLACE_TEXTSYMBOL is where the system tries to replace the text symbols with the proper values, i.e. &VBAK-VBELN& with the actual sales order number. It does this by assigning the value of '(SAPMV45A)VBAK-VBELN' accordingly. Here, unfortunately, '(SAPMV45A)XNAST-OBJKY' is blank (this would normally store the sales order line item number as well, but it has been cleared at this point of time).

Thanks~

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member367551
Participant
0 Kudos

Hi Anand,

Perhaps my explanation was not clear earlier.

In the sales order screen, the user will select a line item, and then click on Extras -> Output -> Item -> Edit. This is where the output type is specified and triggered, when the user hits Save after that.

So, if a sales order has 10 line items, it will not necessarily generate 10 mails. It depends on what the user triggers.

anand_sagarsethi
Contributor
0 Kudos

Deborah Thanks for explanation. I understand the approach. whatever you are trying to do; is purely custom.

It is hard to help you precisely on this approach.

if your approach is fixed, when you select an item and click on its details, do a /h debugging, to understand how the selection of line item stays with the next screen.

You can use the same approach and move the selection details in internal memory by explicitly enhancing SAP code to do that. But I am not sure where.

But if your approach is still not fixed. Help me understand the requirement, what is the real problem that will finally fulfill the business need..

Regards

Anand

anand_sagarsethi
Contributor
0 Kudos

If a sales order has 10 line itmes; it should generate 10 emails..?

is that really make sense : one output type will actually have 10 outputs..?

Ff you really thing its necessary then Nace should have a user defined output type; which will call a custom program to do your job.

Mail title in this case will not work..

Just think Each mail is like each output type.

we can have 1 output from each standard output type; until we dont customize it.

Thanks

Anand

former_member367551
Participant
0 Kudos

Hi Anand,

Perhaps my explanation was not clear earlier.

In the sales order screen, the user will select a line item, and then click on Extras -> Output -> Item -> Edit. This is where the output type is specified and triggered, when the user hits Save after that.

So, if a sales order has 10 line items, it will not necessarily generate 10 mails. It depends on what the user triggers.