2012 Jun 22 9:28 AM
Hello All, My requirement is to display error message when a field(xxx) is not populated in the item level.
The same field(xxx) is at header level also and error message should not be populated if it is blank.
Am using the Include MV45AFZZ for the same and have written my code in the subroutine
USEREXIT_SAVE_DOCUMENT_PREPARE.
Now while saving it is through message when the header field(xxx) is blank and the item data is not yet prepared.
Hello All, My requirement is to display error message when a field(xxx) is not populated in the item level.
The same field(xxx) is at header level also and error message should not be populated if it is blank.
Am using the Include MV45AFZZ for the same and have written my code in the subroutine
USEREXIT_SAVE_DOCUMENT_PREPARE.
Now while saving it is through message when the header field(xxx) is blank and the item data is not yet prepared.
2012 Jun 22 9:46 AM
Which internal table have you used to check the values? You must have used the one with header data.
Suzie
2012 Jun 22 10:02 AM
Hi Suzie,
The problem is both the header as well as item is referring to the same structure VBKD.
2012 Jun 22 10:18 AM
Header and Item levels records are generally in different internal tables even though the structure is different..
There has to be table starting with X like Xvbkd etc.. with the required data.
Just check the Global s tab in debugging mode, to check if any other tables are available.
2012 Jun 22 10:37 AM
Hello Liji,
I am using XVBKD structure, the problem is while creating the sales order I am chacking if xvbkd-posnr is having value ( i.e. not equal to zero) and field XX is blank then raise an error message.
When I am creating the sales order and gave the basic data and saved, it is getting saved without displaying error message. when I have check in debugging POSNR value is 0 the condition is failed and error message is not being displayed.
2012 Jun 22 1:09 PM
I din't get what you said, but is this what you are trying to do?
if ( xvbkd-posnr is not initial ) and ( xvbkd-posnr ne '000000' ).
Chk field xx <> space.
endif.