Application Development 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: 

CATSDB in CATS0012

Former Member
0 Kudos
136

Hello,

I am trying to load SAPLXCAT 3000 using the following query in EXIT_SAPLCATS_012:

SELECT SINGLE * FROM catsdb
  INTO CORRESPONDING FIELDS OF wa_catsdb
WHERE pernr = sap_catsfields-pernr
AND workdate = sap_catsfields-inputdate.

Regardless of whether I run the query wide open or with the where condition, it does not return any records.  The field names match, sap_catsfields-pernr and sap_catsfields-inputdate are both populated, and there is test data in CATSDB.  Any insight would be greatly appreciated.  Also, I am aware that querying header data from CATSDB is not the most elegant solution, so if anyone knows where CAT2 header information is actually stored, please share.  Thanks!

Torey

1 REPLY 1

rajkumarnarasimman
Active Contributor
0 Kudos
59

Hi Torey,

Use conversion exit to append zeros for Employee number before Select statement.

sap_catsfields-pernr = '1234'


"It will append zero to Employee Number

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

  EXPORTING

    INPUT         = sap_catsfields-pernr

IMPORTING

   OUTPUT        =sap_catsfields-pernr


"Please write the select query here

sap_catsfields-pernr =  '000001234'.

Regards

Rajkumar Narasimman