2006 Apr 27 7:29 PM
Hi,
I have a problem in VA02/VA01:
While processing the sales order(VA02), if the Purchase order no.(VBKD-BSTKD_E)is null for the output type 'XXXX' (NAST-KSCHL) & for medium EDI, it should display warning message before saving the document.
Currently for include MV45AFZZ, i can able to fetch the(VBKD-BSTKD_E) value, i couldn't get the NAST-KSCHL value.
please suggest.
Thanks in advance.
Rajani
2006 May 04 12:40 PM
Rajani,
Please try the field exit FIELD_EXIT_NA_KSCHL with the following code:
DATA V_KSCHL LIKE NAST-KSCHL.
V_KSCHL = INPUT.
EXPORT V_KSCHL TO MEMORY ID 'KSCHL'.
Similarly, in MV45AFZZ import the variable checking for the condition:
DATA: V_KSCHL LIKE NAST-KSCHL.
IMPORT V_KSCHL FROM MEMORY ID 'KSCHL'.
IF V_KSCHL = 'XXXX'.
IF VBKD-BSTKD_E = ' '.
MESSAGE WXXX .....
ENDIF.
ENDIF.
I am sure the abovecode will help you resolve the issue.
Please confirm if my solution has met your requirements.
Thanks
Mary Premalatha Danam
2006 Apr 27 7:36 PM
Hi Rajani,
Welcome to SDN.........
Select an entry from NAST where OBJKY of NAST equals to VA01/VA02's Salesorder number.If it is succesful you will KSCHL value from this query.
select kschl into v_kschl
from nast
where objky = va01/va02-vbeln.
Note: If the answer is helpful, please reward points.
Thanks,
Vinay
2006 Apr 28 3:25 PM
Hi,
There is a way in configuration of the output types to attach requirement routines to the output. In these routines you can perform the check for the Purchase Order number and either allow the output or stop the output.
The configuration allows you to attach a different requirement per output type/output medium combination.
Look in configuration under the path:
Sales and Distribution->Basic Functions->Output Control
Hope this helps,
Jerrod
2006 Apr 28 4:37 PM
hi
thanks for the reply.
this we have tried earlier with the help of our functional consultants. this did not work for the current requirement.
if you know any other user exits for output types please suggest.
thanks and regards
rajani
2006 May 04 12:40 PM
Rajani,
Please try the field exit FIELD_EXIT_NA_KSCHL with the following code:
DATA V_KSCHL LIKE NAST-KSCHL.
V_KSCHL = INPUT.
EXPORT V_KSCHL TO MEMORY ID 'KSCHL'.
Similarly, in MV45AFZZ import the variable checking for the condition:
DATA: V_KSCHL LIKE NAST-KSCHL.
IMPORT V_KSCHL FROM MEMORY ID 'KSCHL'.
IF V_KSCHL = 'XXXX'.
IF VBKD-BSTKD_E = ' '.
MESSAGE WXXX .....
ENDIF.
ENDIF.
I am sure the abovecode will help you resolve the issue.
Please confirm if my solution has met your requirements.
Thanks
Mary Premalatha Danam