cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI Mandatory Fields

Former Member
0 Likes
2,956

I am calling BAPIs through the Newtweaver JCO proxy classes . However how can I identify which attributes of the specific bapi are mandatory. The bapi explorer in SAP shows only the import parameters that are mandatory. how could I know which attributes in the ABAP Dictionary are mandatory....?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Likes

hi,

just go to the T-code se37 in sap-R/3 side and type ur BAPI name.

then click on display u will fiend import as well as export and table paramenter for BAPI nad just go on these tab and check which are mandatory fields.

Thanks

Former Member
0 Likes

most mandatory input parameter tables have a set of attributes (fields)...how to check which of these attributes are mandatory..?

for eg: in create business partner we have an import table PARTNERDATA sa mandator.

we have many field inside this table viz. NAME_FIRST, TITLE,NAME_LAST etc....how to check which of these are mandatory.

Former Member
0 Likes

their is no way to find the mandatory field of table parameter.

for that u have to execute the RFC in R/3 side with some data but its like Hit and try method

Former Member
0 Likes

Hi,

As experts said, there is no general way of finding the mandatory fields. The reason for this is...

I am taking an example of PO creation, I am using the BAPI_PO_CREATE in this BAPI the only one mandatory import paramater is POHEADER table (As the optional check box is unchecked for it), now out of all the fields in POHEADER table which are mandtory for you may vary the list of mandatory fields for me. now this same BAPI can used for creating standard PO, Framework PO, Service PO and more... so endless fields used...

(so and so filed missing) depends upon the configuration done by functional consultant. BAPI will always use this configuration to decide the mandatory fields.

Hope this makes it clear for you.

Sachin

Former Member
0 Likes

In addition I will suggest you do just read the BAPI documentation in SE37, because documentation will give you quite helpful information about all fields and their role in data processing.

Regards,

Sarvesh

MichalKrawczyk
Active Contributor
0 Likes

hi,

>>The bapi explorer in SAP shows only the import parameters that are mandatory. how could I know which attributes in the ABAP Dictionary are mandatory....?

you can never find it out like this as most bapis can be used

to perform many types of one transaction

like for example you can create a normal purchase order

or a purchase order with some special line type

for both of them you will use one BAPI

but with different sets of mandatory fields

so there is no way to find out IN GENERAL

which fields are mandatory - that always depends on the process details

ABAP dictonary nor importing the definition into XI will not give you this info

Regards,

Michal Krawczyk

Former Member
0 Likes

So if i am looking for a particular module (not in general)..how can i check which of them are mandatory...Is there any way...?

MichalKrawczyk
Active Contributor
0 Likes

Hi,

>>So if i am looking for a particular module (not in general)..how can i check which of them are mandatory...Is there any way...?

no - as I mentioned even one function module

can be used in many ways - so there is no way to find out IN GENERAL

one module can handle many variants of the same process and all of them

will require different fields

Regards,

Michal Krawczyk

Former Member
0 Likes

Then how is it that SAP throws an error message saying 'so and so fields are missing'...there must be some place where all this is defined...

MichalKrawczyk
Active Contributor
0 Likes

hi,

>>Then how is it that SAP throws an error message saying 'so and so fields are missing'...there must be some place where all this is defined...

sure there is - inside the code

you can check the whole code and you will know for sure then

Regards,

Michal Krawczyk

Former Member
0 Likes

>

> Then how is it that SAP throws an error message saying 'so and so fields are missing'...there must be some place where all this is defined...

In the documentation as well.

Shabarish_Nair
Active Contributor
0 Likes

If you have imported the BAPI in XI, you can open it and check the occurances. When ever a node or a field is having the minimum occurance as 1 then it is a mandatory field.