Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem while Fetchign data from

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.

Former Member
Not what you were looking for? View more on this topic or Ask a question