2010 Sep 24 5:03 AM
Hi all
I was trying to get customer's all detail data using method GET_DATA of class CMD_EI_API_EXTRACT.
but the data i get is all initial. it means i get no data.
Is any one know the problem?, please tell me Thanks.
my code is like below.
DATA:
L_IS_MASTER_DATA TYPE CMDS_EI_MAIN,
L_ES_MASTER_DATA TYPE CMDS_EI_MAIN,
L_ES_ERROR TYPE CVIS_MESSAGE.
DATA: T_CUSTOMERS TYPE CMDS_EI_EXTERN_T,
S_CUSTOMERS TYPE LINE OF CMDS_EI_EXTERN_T.
DATA: T_COMPANY TYPE CMDS_EI_COMPANY_T,
S_COMPANY TYPE LINE OF CMDS_EI_COMPANY_T.
DATA: T_SALES TYPE CMDS_EI_SALES_T,
S_SALES TYPE LINE OF CMDS_EI_SALES_T.
S_CUSTOMERS-HEADER-OBJECT_INSTANCE-KUNNR = '002000013'."customer No
S_CUSTOMERS-HEADER-OBJECT_TASK = 'M'.
S_COMPANY-DATA_KEY-BUKRS = '2000'." Company code
APPEND S_COMPANY TO T_COMPANY.
S_CUSTOMERS-COMPANY_DATA-COMPANY = T_COMPANY.
S_SALES-DATA_KEY-VKORG = '2000'."sales ORG
S_SALES-DATA_KEY-VTWEG = '10'." distribution channel
S_SALES-DATA_KEY-SPART = '00'." divsion
APPEND S_SALES TO T_SALES.
S_CUSTOMERS-SALES_DATA-SALES = T_SALES.
APPEND S_CUSTOMERS TO T_CUSTOMERS.
L_IS_MASTER_DATA-CUSTOMERS = T_CUSTOMERS.
CALL METHOD CMD_EI_API_EXTRACT=>GET_DATA
EXPORTING
IS_MASTER_DATA = L_IS_MASTER_DATA
IMPORTING
ES_MASTER_DATA = L_ES_MASTER_DATA
ES_ERROR = L_ES_ERROR.
2010 Sep 25 5:50 PM
Hi,
Try to check all the internal table data by debugging, I am getting confused why u using,
XXXX type CMDS_EI_*_T to create internal table.
Regards!
Sheik
2010 Sep 27 1:37 AM
Hi Sheik, Thank you for your reply.
I've checked the internal tables and i get the data in the internal tables is initial.
why i using XXXX type CMDS_EI_*_T to create internal table is i just wanna fill the internal table L_IS_MASTER_DATA up with
select condtion data.
best regards.
Edited by: alex.lee on Sep 27, 2010 2:39 AM
Edited by: alex.lee on Sep 27, 2010 2:40 AM
2010 Sep 29 9:07 AM
I've found the reason, It's my fault. the length of customer number is 10, but i gave 9.
so it can't find the data.
and i even find that when you give the company code to the method using selected condtion, do not
give this like this S_COMPANY-TASK = 'M' and S_SALES-TASK = 'M' neither.
if you do that you will get no data.