2013 Jun 27 10:56 AM
Hi All.
I have done validation for Customer master XD01,XD02) in class” IF_EX_CUSTOMER_ADD_DATA~CHECK_ALL_DATA” .
It ‘s working fine but same validation are getting triggered for “Create contact person”(VAP1/VAP2) also.
Because, that class is called in both program. So how can do restriction here ? my code should work when customer master is create/changed.
Please help me to restrict my code.
Thanks.
NJ
Hi All.
I have done validation for Customer master XD01,XD02) in class” IF_EX_CUSTOMER_ADD_DATA~CHECK_ALL_DATA” .
It ‘s working fine but same validation are getting triggered for “Create contact person”(VAP1/VAP2) also.
Because, that class is called in both program. So how can do restriction here ? my code should work when customer master is create/changed.
Please help me to restrict my code.
Thanks.
NJ
2013 Jun 27 11:00 AM
Hi Nagraj,
Check Transaction code SY-TCODE in your implementation.
Regards,
Sreenivas.
2013 Jun 27 11:07 AM
Hi Sree.
Thanks for your reply..Restriction by tcode will do if no any other options..right? sametime i am not sure where ever it will affect .
regards.
NJ
2013 Jun 27 11:11 AM
Hi NJ,
I dont think there is any mistake in restricting it based on Sy-Tcode. If you are not sure from where else this is being triggered then do a negative check like
if sy-tcode NE VAP1 or VAP2
endif.
Regards,
Swarna
2013 Jun 27 11:08 AM
Hi Nagaraj,
U could use a select query and get the records from CDHDR table and do the validation based on that value.
SELECT objectclas
objectid
changenr
udate
tcode
FROM cdhdr
INTO TABLE gt_cdhdr
FOR ALL ENTRIES IN gt_cust
WHERE objectclas EQ 'DEBI'
AND objectid = gt_cust-kunnr
AND change_ind IN ('U','I')
AND udate IN r_date
AND tcode IN ('XD01','XD02').
Hope it helps.
Regards,
Adithi
2013 Jun 27 12:38 PM
You could memorize in an instance attribute of your implementation class the initial values of those fields (in a method like READ_ADD_ON_DATA) and in CHECK_ALL_DATA check first if data was changed.
But if the customer data are no longer valid, you could raise at least a warning message to inform current user ?
Regards,
Raymond
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |