‎2006 Jul 05 11:43 AM
Hi,
What is the purpose of EX: <b>DATA</b> & <b>DATAX</b> Internal tables in Function Modules.
Thanks,
Prasad.
‎2006 Jul 05 11:47 AM
DATA table has all the fields related to a document and DATAX has one character flag field for each field in the structure DATA.
For Eg DATA - VBELN VKGRP KUNNR
DATAX VBELN VKGRPX(1) KUNNRX(1)
If you need to change the document attributes you need to pass the new values to the fields in DATA and the corresponding flags in DATAX should be set to X.
-Kiran
*Please reward useful answers
‎2006 Jul 05 11:47 AM
DATA table has all the fields related to a document and DATAX has one character flag field for each field in the structure DATA.
For Eg DATA - VBELN VKGRP KUNNR
DATAX VBELN VKGRPX(1) KUNNRX(1)
If you need to change the document attributes you need to pass the new values to the fields in DATA and the corresponding flags in DATAX should be set to X.
-Kiran
*Please reward useful answers
‎2006 Jul 05 11:52 AM
Hi Prasad,
DATAX is generally used for setting a flag to the value.
see the example
DATA: POHEAD TYPE BAPIMEPOHEADER.
DATA: POHEADX TYPE BAPIMEPOHEADERX.
POHEAD-COMP_CODE = '0010'.
POHEADX-COMP_CODE = 'X'.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = POHEAD
POHEADERX = POHEADX
IMPORTING
EXPPURCHASEORDER = EX_PO_NUMBER
EXPHEADER = EXP_HEAD
TABLES
RETURN = I_RETURN
POITEM = POITEM
POITEMX = POITEMX
POSCHEDULE = POSCHED
POSCHEDULEX = POSCHEDX.
‎2006 Jul 05 11:54 AM
<b>DATA</b> tables will be having the values which needs to be processed.
<b>Eg</b> For BAPI_PO_CHANGE POITEM is a data table.
<b>DATAX</b> will be the table which tells the function module which fields should be considered for process.
<b>Eg:</b> For BAPI_PO_CHANGE POITEMX is a datax table.
It will be just a flag which tells the fields to be considered.
rgds,
TM.
‎2006 Jul 05 11:57 AM
DATA : is the structure to hold the values of certain fields.
DATAX : the structure of this also similar to DATA but the field attributes will be CHAR 1. its just indicating what values in DATA is given for modification.
the fields who has X in DATAX, those fields from DATA will be taken for consideration.
example : BAPI_MATERIAL_SAVEDATA function module,
we have CLIENTDATA & CLIENTDATAX.
both these structures having 95 fields. to inform to sap what values we are populating in CLIENTDATA, we will keep 'X' to those fields in CLIENTDATAX. sap will consider only 'X' fields from CLIENTDATAX structure & retrieves values for only those fields in CLIENTDATA structure.
regards
srikanth
regards
srikanth