Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How the Standard table update through BAPI

Former Member
0 Likes
4,822

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

9 REPLIES 9
Read only

Former Member
0 Likes
3,236

Hi, if you look deep inside BAPI, you cab see it

Read only

0 Likes
3,236

I have done the global search ..But didn't see the inder/modify statement.

Read only

0 Likes
3,236

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.

Read only

ThomasZloch
Active Contributor
0 Likes
3,236

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

Read only

Former Member
0 Likes
3,236

if you drill down enough in the right places you may well find a BDC and a call transaction going on!....

Read only

Former Member
0 Likes
3,236

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.

Read only

0 Likes
3,236

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

Read only

Former Member
0 Likes
3,236

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.

Read only

Former Member
0 Likes
3,236

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.