‎2008 Sep 05 4:25 AM
Hi!
what is the use of checkbox structure in BAPI and what is dictionary ref in BAPI.
thanks
Amit
‎2008 Sep 05 4:58 AM
Hello Amit
BAPI are usually well-documented, e.g. PLANTDATAX of BAPI_MATERIAL_SAVEDATA:
Information on update for PLANTDATA
Description
This (checkbox) structure determines which fields in the assigned user
data structure (PLANTDATA) contain change-relevant information.
This makes it possible to supply valid values only to the relevant
fields in the assigned user data structure. These fields are then
selected in the checkbox structure, ensuring that all nonselected fields
retain their current value in the database.
All fields in the structure use the data element BAPIUPDATE.
Documentation for BAPIUPDATE:
Updated information in related user data field
Definition
This flag is used to select fields containing modified values in the
parameter. It is used in, for example, change methods.
The value 'X' means that the associated field contains an updated value.
The value BLANK means that the field does not contain an updated value.
Conventions for Parameters with Updated Values (update parameter)
The parameter has exactly the same fields as the parameter with the user
data. The name of the update parameter should consist of the user data
parameter name with an additional 'X'
For example: User data parameter name: Equisales
Update parameter: EquisalesX
If the parameter is a table the update parameter must also be a table.
Example
The distribution channel (Distr_Chan) should be changed to the value
'US'.
Business Object: PieceOfEquipment
BAPI: Update
Parameter with updated data: EquiSales
Fields in EquiSales: SalesOrg
Distr_Chan = 'US'
Division
...
Parameter for modified data: EquiSales_x
Fields in EquiSalesX: SalesOrg
Distr_Chan = 'X'
Division
...
In the parameter EquiSales_x the field Distr_Chan has the value 'X',
meaning that the field EquiSales-Distr_Chan contains modified values.
Further Notes
This procedure is necessary because otherwise fields containing updated
values cannot be identified. Using an initial value is no solution
because an initial value could also be valid new value. Also, in the
ABAP programming language or on other development platforms, you cannot
assign the value "zero" to a field in order to select fields and thus
indicate that the remaining fields contain update values. For further
information see the BAPI Programming Guidelines.
Regards
Uwe
‎2008 Sep 05 4:31 AM
checkbox have only 2 values : space or 'X' ... to create into the BAPI a field or structure whit these values you must create o assign a estructure like, for example, a BAPI_MARAX-DEL_FLAG ... look at BAPI_MATERIAL_SAVEDATA ....
David Carballido ^^
‎2008 Sep 05 4:58 AM
Hello Amit
BAPI are usually well-documented, e.g. PLANTDATAX of BAPI_MATERIAL_SAVEDATA:
Information on update for PLANTDATA
Description
This (checkbox) structure determines which fields in the assigned user
data structure (PLANTDATA) contain change-relevant information.
This makes it possible to supply valid values only to the relevant
fields in the assigned user data structure. These fields are then
selected in the checkbox structure, ensuring that all nonselected fields
retain their current value in the database.
All fields in the structure use the data element BAPIUPDATE.
Documentation for BAPIUPDATE:
Updated information in related user data field
Definition
This flag is used to select fields containing modified values in the
parameter. It is used in, for example, change methods.
The value 'X' means that the associated field contains an updated value.
The value BLANK means that the field does not contain an updated value.
Conventions for Parameters with Updated Values (update parameter)
The parameter has exactly the same fields as the parameter with the user
data. The name of the update parameter should consist of the user data
parameter name with an additional 'X'
For example: User data parameter name: Equisales
Update parameter: EquisalesX
If the parameter is a table the update parameter must also be a table.
Example
The distribution channel (Distr_Chan) should be changed to the value
'US'.
Business Object: PieceOfEquipment
BAPI: Update
Parameter with updated data: EquiSales
Fields in EquiSales: SalesOrg
Distr_Chan = 'US'
Division
...
Parameter for modified data: EquiSales_x
Fields in EquiSalesX: SalesOrg
Distr_Chan = 'X'
Division
...
In the parameter EquiSales_x the field Distr_Chan has the value 'X',
meaning that the field EquiSales-Distr_Chan contains modified values.
Further Notes
This procedure is necessary because otherwise fields containing updated
values cannot be identified. Using an initial value is no solution
because an initial value could also be valid new value. Also, in the
ABAP programming language or on other development platforms, you cannot
assign the value "zero" to a field in order to select fields and thus
indicate that the remaining fields contain update values. For further
information see the BAPI Programming Guidelines.
Regards
Uwe