Application Development and Automation 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: 
Read only

Regarding Functon Modules

Former Member
0 Likes
758

Hi,

What is the purpose of EX: <b>DATA</b> & <b>DATAX</b> Internal tables in Function Modules.

Thanks,

Prasad.

1 ACCEPTED SOLUTION
Read only

Former Member
645

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

4 REPLIES 4
Read only

Former Member
646

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

Read only

Former Member
0 Likes
645

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.

Read only

Former Member
0 Likes
645

<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.

Read only

Former Member
0 Likes
645

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