Ansicht
Dokumentation

GR4XY_PROVIDE_DATA - BAdI: Change Header and Item Data in Goods Receipts

GR4XY_PROVIDE_DATA - BAdI: Change Header and Item Data in Goods Receipts

ABAP Short Reference   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

Use

This Business Add-In (BAdI) is used in the Inventory Management(MM-IM) component. You can use this Business Add-In (BAdI) to change the data in the document header, item, subitem, stocktype, subitem_stocktype and serial number fields of goods receipts for purchase orders, production orders, goods receipts for inbound delivery processes, and subsequent adjustment of subcontracting purchasing documents process.

It is intended to provide the initial values of the app when the app is loaded although it might be called several times.

Parameters

The following parameters are provided:

Import Parameters

  • GR4XY_HEADER:
Contains information about the document header of the goods receipt that is currently being processed (for example: SourceOfGR, InboundDelivery number, PurchasingDocument number, PurchasingDocumentTypeetc).
Note that depending on the goods receipt process, not all fields of this structure contain data.
  • GR4XY_ITEM:
Contains information about the corresponding document item of the goods receipt that is currently being processed (for example: InboundDelivery number, SourceOfGR, DeliveryDocumentItem, Material, StockTypeetc).
Note that depending on the goods receipt process, not all fields of this structure contain data.
  • GR4XY_SUBITEM:
Contains information about the component items of the subcontracting document items that are currently being processed in the subcontracting process (for example: InboundDelivery number, SourceOfGR, DeliveryDocumentItem, ComponentID, Material, Plant etc).
Note that depending on the goods receipt subcontracting process, this table is not always filled with data.
  • GR4XY_STOCKTYPE:
Contains information about the corresponding stocktype of the goods receipt that is currently being processed (for example: InboundDelivery, SourceOfGR, DeliveryDocumentItem, StockType, MovementType, ControlOfReasonCodeTableFieldetc).
  • GR4XY_SUBITEM_STOCKTYPE:
Contains information about the corresponding movement type and control fields of the component items that are currently being processed in the subcontracting process (for example: InboundDelivery, SourceOfGR, DeliveryDocumentItem, ParentComponentID, MovementType, ControlOfReasonCodeTableField etc).
  • GR4XY_SERIALNUMBER:
Contains information about the serial numbers of the goods receipt that is currently being processed (for example: DeliveryDocumentItem and SerialNo).

Changing Parameters

  • CHANGE_HEADER:
Contains changeable fields in the document header of the goods receipt that is currently being processed (for example: DocumentDate, PostingDate, MaterialDocumentHeaderText, VersionForPrintingSlipetc).
  • CHANGE_ITEM:
Contains changeable fields in the corresponding document item of the goods receipt that is currently being processed (for example: DeliveryDocumentItem, Batch, DocumentItemText, ManufactureDate, a Custom Fieldetc).
  • CHANGE_SUBITEM:
Contains changeable fields in the corresponding component items of the subcontracting document items that are currently being processed in the subcontracting process (for example: DeliveryDocumentItem, ComponentID, Batch, ShelfLifeExpirationDateetc).
  • CHANGE_STOCKTYPE:
Contains changeable fields in the corresponding stocktype of the goods receipt that is currently being processed (for example: DeliveryDocumentItem, MovementType, ControlOfBatchTableField, ControlOfReasonCodeTableFieldetc).
  • CHANGE_SUBITEM_STOCKTYPE:
Contains changeable fields in the corresponding stocktype of the component items that are currently being processed in the subcontracting process (for example: DeliveryDocumentItem, ParentComponentID, ControlOfBatchTableField, ControlOfReasonCodeTableField etc).
  • CHANGE_SERIALNUMBER:
Contains changeable fields for the serial numbers of the goods receipt that is currently being processed (for example: DeliveryDocumentItem, SerialNoetc).

Notes

For some editable fields, restrictions apply:

  • GR4XY_HEADER - SOURCEOFGR, GR4XY_ITEM-SOURCEOFGR, GR4XY_SUBITEM-SOURCEOFGR, GR4XY_STOCKTYPE-SOURCEOFGR, GR4XY_SUBITEM_STOCKTYPE-SOURCEOFGR:
These fields have values according to the corresponding processes as follows:
  • Production Order: ‘PURORD’

  • Purchase Order: ‘PRODORD’

  • Inbound Delivery: ‘INBDELIV’

  • No Reference: ‘NOREF’

  • Subsequent Adjustment: ‘SUBSQNTADJ’

Note: If a goods receipt without reference is processed, this BAdI will not be executed.
  • CHANGE_STOCKTYPE - ControlOfReasonCodeTableField:
This field is a character (bit) pattern control field, with each character signifying a particular status (in that exact order): Visible | Mandatory | ReadyForInput | Dummy1 | Dummy2.A character/bit of 0 means false, whereas a character/bit of 1 means yes/true.
Example 1: "11100" means: the field is visible, mandatory, and ready for input
Example 2: "10100" means: the field is visible, not mandatory, and ready for input
  • CHANGE_STOCKTYPE - ControlOfBatchTableField:
This field is a character (bit) pattern control field, with each character signifying a particular status (in that exact order): Visible | Mandatory | ReadyForInput | Dummy1 | Dummy2.A character/bit of 0 means false, whereas a character/bit of 1 means yes/true.
  • CHANGE_STOCKTYPE - MovementType:
This standard movement can be changed to custom movement type only when the custom movement type is copied from the standard movement type. For example, the custom movement type Z01 can replace the standard movement type 101 when Z01 is copied from 101.
Restriction: the change of custom movement type for a return purchase order item shall not be supported by this Business Add-In (BAdI).
  • CHANGE_HEADER - VersionForPrintingSlip:
This field has the following values:
  • No Print: 0 (by default)

  • Individual Slip: 1

  • Individual Slip with Inspection Text: 2

  • Collective Slip: 3

Note that the document date and the posting date need to be set carefully, especially if variable SYis used.
There are date fields and time fields that depend on the corresponding server and the user time zone. In cloud applications, the server may be located in a different time zone than the user. Hence, the server date and the user date may differ from each other. This is especially important at period borders, as the server time zone may be behind the user time zone, and the period end closing has not been done. If the user time zone is used for the posting date, then the user may do a material document posting in a period that's not open.
Further combinations may exist that could potentially cause issues.

If the posting date and the document date are not set within this BAdI, then the Fiori applications use the user time zone for these dates as presetting, which can be changed by the user.






ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 9813 Date: 20240523 Time: 214955     sap01-206 ( 147 ms )