‎2009 Apr 15 8:01 AM
Hi,
I am fetching the data from table CDHDR but though there exists data in the database table, the select query is giving 0 Entries..Please look into my code.
SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr, "Account Number of Vendor or Creditor
s_kunnr FOR kna1-kunnr, "Customer Number
s_bp FOR but000-partner, "Business Partner
s_udate FOR cdhdr-udate OBLIGATORY. "Create/Change Date
TYPES: BEGIN OF ty_cdhdr_v,
MANDANT type MANDT, "Client
objectclas TYPE cdobjectcl, "Object class
objectid TYPE cdobjectv, "Object value
changenr TYPE cdchangenr, "Document change number
username TYPE cdusername, "User name of the person responsible in change document
udate TYPE cddatum, "Creation date of the change document
tcode TYPE cdtcode, "Transaction in which a change was made
langu TYPE langu, "Language Key
END OF ty_cdhdr_v.
DATA : it_cdhdr_v TYPE STANDARD TABLE OF ty_cdhdr_v.
start-of-selection.
Get data from CDHDR for Vendors
SELECT MANDANT "Client
objectclas "Object class
objectid "Object value
changenr "Document change number
username "User name of the person responsible in change document
udate "Creation date of the change document
tcode "Transaction in which a change was made
langu "Language Key
INTO TABLE it_cdhdr_v
FROM cdhdr
WHERE objectclas EQ 'KRED'
AND objectid EQ s_lifnr
AND udate EQ s_udate
AND tcode IN ('XK01','XK02')
AND langu EQ sy-langu.
Regards,
Deepthi.
‎2009 Apr 15 8:03 AM
Get data from CDHDR for Vendors
SELECT MANDANT "Client
objectclas "Object class
objectid "Object value
changenr "Document change number
username "User name of the person responsible in change document
udate "Creation date of the change document
tcode "Transaction in which a change was made
langu "Language Key
INTO TABLE it_cdhdr_v
FROM cdhdr
WHERE objectclas EQ 'KRED'
AND objectid IN s_lifnr
AND udate IN s_udate
AND tcode IN ('XK01','XK02')
AND langu EQ sy-langu.
‎2009 Apr 15 8:07 AM
Hi Deepthi,
The problem must be surely in your select conditions,
Try to comment the below three conditions which is most likely to cause the problem.
Uncomment one by one and round off where exactly is your problem.
>AND objectid IN s_lifnr
>AND udate IN s_udate
>AND tcode IN ('XK01','XK02').
Let me know if it works.
Gowri