2009 Jun 29 9:24 AM
Hi,
I will get a Customer Record from an Application server.
I have a requirement to Validate Complete customer data before create a customer(First I want to Confirm whether the Provided data is valid, If the errors are there i need to show else i need to show Success message to go ahead and Create).
Is there any option to validate the data using XD01 or
to Validate using Call Transaction Method and Transaction Roll Back? Please give me possible ways..
Thanks,
Sekhar.J
Hi,
I will get a Customer Record from an Application server.
I have a requirement to Validate Complete customer data before create a customer(First I want to Confirm whether the Provided data is valid, If the errors are there i need to show else i need to show Success message to go ahead and Create).
Is there any option to validate the data using XD01 or
to Validate using Call Transaction Method and Transaction Roll Back? Please give me possible ways..
Thanks,
Sekhar.J
2009 Jun 29 9:41 AM
First of all use OPEN/READ/CLOSE DATASET to read the information from application server into an internal table.
Now you can make do your validation to check that all the necessary/mandatory fields ahve been provided by the file.
Next, you can also check if the customerwith those detauils is aready available in system, make use of BAPI_CUSTOMER_GETDETAIL1
Now,again to validate you can make use of BAPI_CUSTOMER_CREATEFROMDATA1 you will find a return parameters.
Call this BAPI, and loop on the returns parameters for "A" and 'E' (Abort/Error). If there are any errors then write these details to your summary error table.
If no errros have been returned then you can make use of BAPI_TRANSACTION_COMMIT to create the custoer in system.
If error have been returned then make use of BAPI_TRANSACTION_ROLLBACK
Hope this helps.
2009 Jun 29 9:44 AM
HI Sekhar ,
U can create the customer using BDC call transaction , because in BDC , data is automaticaly validated.
Thanks
Shambhu
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |