2015 May 08 5:41 AM
HI Guys,
I need to validate fields in module pool programming.
i have declared the fields like below:
CHAIN.
FIELD ZTYPE_INVOICES-CUSTOMINVOICE.
FIELD ZTYPE_INVOICES-CUSTOMINVOICE1.
FIELD ZTYPE_INVOICES-CUSTOMINVOICE2.
FIELD ZTYPE_INVOICES-CUSTOMINVOICE3.
FIELD ZTYPE_INVOICES-CUSTOMINVOICE4.
MODULE validate_input ON CHAIN-INPUT.
ENDCHAIN.
then inside the module i coded like this :
MODULE VALIDATE_INPUT INPUT.
SELECT VBELN
from VBRK
into TABLE it_validate
where vbeln = ZTYPE_INVOICES-CUSTOMINVOICE.
if sy-subrc <> 0.
Message 'Enter the valid invoice no.' type 'I'.
endif.
ENDMODULE.
but it's not working.
any advise.
Thanks,
Amit
2015 May 08 5:49 AM
Hi,
your flow logic is after PAI?
Why do you select into a table IT_VALIDATE and not SELECT SINGLE. Is the 1st field of table IT_VALIDATE of type VBELN?
Regards,
Klaus
2015 May 08 5:49 AM
Hi,
your flow logic is after PAI?
Why do you select into a table IT_VALIDATE and not SELECT SINGLE. Is the 1st field of table IT_VALIDATE of type VBELN?
Regards,
Klaus
2015 May 08 6:11 AM
Hi Klaus,
yes, the flow logic is after PAI.
i tried using select single also but it dosen't work. yes, the 1st field of internal table is of type VBELN.
Thanks,
Amit
2015 May 08 6:20 AM
Hi Amit,
please check that field ZTYPE_INVOICES-CUSTOMINVOICE is also of type VBELN. For conversion exit it mustn't be of another type (data element).
Regards,
Klaus
2015 May 08 6:35 AM
Hi Klaus,
Thanks alot.Yes, the data element was different. i changes it to match the VBELN an it solved my problem.
I have rewarded points to you.
Thanks,
Amit