2014 Feb 26 1:29 PM
Hi ,
Please help me to understand ,how a BAPI create a master record . and updated all the item tables at the same time . But inside the BAPI ,i did not found any insert statement.
Fir example when a material created all the tables like : mara , makt, marc,mvke,stxh,mebw,mglt,mlgn ,mlan update the BAPI_MATERIAL_SAVEDATA ..but their is no insert/modify statement inside the BAPI.
Then how the record update.
Thanks
2014 Feb 26 1:44 PM
2014 Feb 27 10:19 AM
I have done the global search ..But didn't see the inder/modify statement.
2014 Feb 27 1:13 PM
what is a global search? It work only with the current main program. So when there is a call of a FM from within other function-group, your search will not find it. If you want to see the exact insert statement, you can place a breakpoint on those commands. But most likely those will be called via an update-task, so you would have to switch on the update-task debugging.
2014 Feb 27 10:36 AM
Often this is passed down to other function modules in yet other function groups, so your global search will not find it.
A sure way to find out is to trace an execution via transaction ST12, study the SQL summary (shows all SELECTs, INSERTs, DELETEs) and drill down to the ABAP code.
Thomas
2014 Feb 27 11:41 AM
if you drill down enough in the right places you may well find a BDC and a call transaction going on!....
2014 Feb 27 12:06 PM
Generally material creation, PO creation, Sales order creation etc is not done directly by inserting data into standard table. It done thorough calling standard transaction. Transaction will ultimately insert data into table.
Advantage of using transaction is that all authorization and validation is handled by transaction.
In your BAPI you will find CALL Transaction statement.
Let me know if this make sense to you.
Regards,
Jigar Thakkar.
2014 Feb 27 12:12 PM
I don't think so (based on the ones which I know well, mostly FI and MM related). One major advantage of BAPIs is that they are not dependent on those fragile screen flows. Usually you find direct table updates deep down below which are wrapped in several logical layers until you reach the interface to the outside world (BAPI parameters).
Thomas
2014 Feb 27 12:26 PM
Hae dude,
Have a look at the simple BAPI ( BAPI_BANKDETAIL_CREATE ) in that it is calling another FM ( HR_INFOTYPE_OPERATION ) to update the data into sap tables. Inside that FM it uses call dialog procedure. There is no rule / need to use SQL Statements directly. Based on the business process requirement it was designed to update the data to DB Tables.
If you can search line by line and in depth you will definitely find a procedure that updates the data. It was not a miracle to update the data without a procedure / sql language commands.
Regards,
Mayure.
2014 Feb 27 2:29 PM
One option is that you start SQL trace using ST05 and see where your standard SAP table is updated.
Let me know if this helps you.
Regards,
Jigar Thakkar.