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: 

Requirement for VA01 / VA02

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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