Application Development 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: 

BAPI and screen checks

Former Member
0 Kudos

Hello,

The scenario is like this.

F-02 is used to post a document. There is a field XREF2 (12 chars) to which a search help is assigned. This field when used in F-02 does not accept other values other than the ones provided by search help.

Now, when I use BAPI_ACC_GL_POSTING_POST I can assign whatever I want to XREF2, post the document and it will bypass the screen checks storing any value in this field.

I could take the table used by search help and check the values myself, the problem is it might be changed anytime(a different table might be assigned to search help for example), as well as number of fields with attached search helps may vary.

So I'm interested whether it is possible to perform screen field checks for the BAPI somewhat automatically ?

Thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

you can't perform screen checks while using bapi

Former Member
0 Kudos

Hello,

You should not worry about the screen checks as BAPI will do all the validations before uploading the data. You can see the error messages from RETURN table of BAPI. If data provided by you is correct it will upload it, if not error message will be there in RETURN table.

Hope this solves your query.

Regards,

Brajvir

0 Kudos

Well, in F-02 there are additional checks on the fields. A search help which only allows entries from table ZXXXX to be typed in field XREF2. BAPI does not check it and allows to enter values which are not verified against table ZXXXX. Thus the behavior is different - F-02 limits set of allowed entries and BAPI doesn't. I wanted both to behave the same way(limiting entries) but from the first response I believe it can't be done automatically.

For now I have a partial solution - using F4IF_FIELD_VALUE_REQUEST to fetch search help entries for field BSEG-XREF2 and validate data before I pass it to BAPI.