Skip to Content

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

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~

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 01, 2017 at 07:59 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Jun 02, 2017 at 12:43 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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