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 'X'

Former Member
0 Kudos

What does 'X' indicator do when the BAPI is of any of the UPDATEFLAGS: U = change, D = delete, I = add.

for example if the BAPi update flag is set to "D". Does the 'X' indicator will be delete the matching record from the BAPI record?

Thanks

SDN FAN

2 REPLIES 2

Former Member
0 Kudos

The X indicator will tell the BAPI which fields are being updated. If you don't pass a X, then that specific field data will not be updated even if you are passing the data.

Regards,

Ravi

Note : Please mark all the helpful answers

uwe_schieferstein
Active Contributor
0 Kudos

Hello

The 'X' indicator are sometimes used stand-alone and sometimes together with a "general" flag, e.g.:

- BAPI_SALESORDER_CREATEFROMDAT2: combination of flags, see documentation of parameter ORDER_HEADER_INX

 Sales Order Check List

 Description

     This paramter fulfills the following two tasks:


     o   Controls processing functions with the value in the UPDATEFLAG field
         (change indicator).
         The following entries are available:
         ' ' :  Create a new sales document
         I:     Create a new sales document
         U:     Change an existing sales document
         😧     Delete an existing sales document


     o   Controls the field entry with checkboxes
         If the UPDATEFLAG field has been activated, the system only copies
         those fields from the SALES_HEADER_IN parameter that have been
         activated with 'X'.

- BAPI_USER_CHANGE: stand-alone use, see documentation of parameter ADDRESSX

 Select Change-Relevant Fields

 Bedeutung

     Die Methode 'Change' ändert nur die übergebenen Felder, die explizit als
     änderungsrelevant gekennzeichnet sind. Zu jeder Struktur mit Namen
     <name> existiert eine Struktur mit Namen <name>X.
     Diese Struktur dient der Kennzeichnung der änderungsrelevanten Felder.
     Es werden nur die Felder der Struktur <name> geändert, für die das
     gleichnamige Feld in <name>X nicht initial ist.

SAP has not translated this documentation yet it simply says that only fields for which the corresponding 'X' indicator is marked will be changed.

Another variation can be found in BAPI_USER_ACTGROUPS_ASSIGN. The BAPI makes a delta analysis between the roles provided at parameter ACTIVITYGROUPS and the roles that are currently assigned to the user. If none of the assigned roles is provided all of them will be unassigned.

Based on my experience these are probably the three major approaches of BAPIs to deal with changes.

Regards

Uwe