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