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

Overriding User Defaults With BAPI

scottmk
Explorer
0 Likes
790

SAP Gurus,

My team is familiarizing themselves with the BAPI function group and is attempting to refine a program that will execute the creation of material master data using an input file. Currently this is being accomplished using the function 'BAPI_MATERIAL_SAVEDATA'. My tester was noticing that the program was generating additional views in the material master beyond what was needed for the program and would like them not to generate for simplicity's sake. However, these views are being generated due to defaults that the tester has in place for screen generation when running MM01 manually. Is there a way within the BAPI function to disable these views from appearing even if a user has them marked as defaults?

Thank you for your assistance.

1 ACCEPTED SOLUTION
Read only

michael_kozlowski
Active Contributor
0 Likes
742

Check import parameter HEADDATA

There are flags which views to create:

BASIC_VIEWSICHT_KCHAR10Basic Data View
SALES_VIEWSICHT_VCHAR10Sales View
PURCHASE_VIEWSICHT_ECHAR10Purchasing View
MRP_VIEWSICHT_DCHAR10Material Requirements Planning (MRP) View
FORECAST_VIEWSICHT__PCHAR10Forecasting View
WORK_SCHED_VIEWSICHT_ACHAR10Work Scheduling View
PRT_VIEWSICHT_FCHAR10Production Resources/Tools (PRT) View
STORAGE_VIEWSICHT_LCHAR10Storage View
WAREHOUSE_VIEWSICHT_SCHAR10Warehouse Management View
QUALITY_VIEWSICHT_QCHAR10Quality Management View
ACCOUNT_VIEWSICHT_BCHAR10Accounting View
COST_VIEWSICHT_GCHAR10Costing View

SAP Gurus,

My team is familiarizing themselves with the BAPI function group and is attempting to refine a program that will execute the creation of material master data using an input file. Currently this is being accomplished using the function 'BAPI_MATERIAL_SAVEDATA'. My tester was noticing that the program was generating additional views in the material master beyond what was needed for the program and would like them not to generate for simplicity's sake. However, these views are being generated due to defaults that the tester has in place for screen generation when running MM01 manually. Is there a way within the BAPI function to disable these views from appearing even if a user has them marked as defaults?

Thank you for your assistance.

2 REPLIES 2
Read only

michael_kozlowski
Active Contributor
0 Likes
743

Check import parameter HEADDATA

There are flags which views to create:

BASIC_VIEWSICHT_KCHAR10Basic Data View
SALES_VIEWSICHT_VCHAR10Sales View
PURCHASE_VIEWSICHT_ECHAR10Purchasing View
MRP_VIEWSICHT_DCHAR10Material Requirements Planning (MRP) View
FORECAST_VIEWSICHT__PCHAR10Forecasting View
WORK_SCHED_VIEWSICHT_ACHAR10Work Scheduling View
PRT_VIEWSICHT_FCHAR10Production Resources/Tools (PRT) View
STORAGE_VIEWSICHT_LCHAR10Storage View
WAREHOUSE_VIEWSICHT_SCHAR10Warehouse Management View
QUALITY_VIEWSICHT_QCHAR10Quality Management View
ACCOUNT_VIEWSICHT_BCHAR10Accounting View
COST_VIEWSICHT_GCHAR10Costing View
Read only

0 Likes
742

Thank you, Michael.

Unfortunately I think that what the user was asking for isn't possible. I have the view values in HEADDATA assigned as appropriate. The user just has view defaults set in their SAP system for transaction MM03 that causes them to see windows they do not need. They wanted to know if the program could override their defaults without them having to do anything but I'm thinking this is something that they are just going to have to do themselves. Unless there is something I'm missing.

EDIT:

Michael,

Turns out that I was looking at the wrong program. The material creation program was executing fine but then the user was modifying the material with another program that had different settings and that was causing the additional views.

Thank you for your help.

Message was edited by: Scott Kellner