2013 Nov 18 6:10 AM
Hi Team,
We have a client requirement to include an additional field in our ad-hoc query to fetch the descritpion for position from hrt1002 table for this we are using fm RH_READ_HRP1002 to first fetch details from hrp1002 table under node for org assignment.
in parameter act_begda and act_endda need to pass the value choosen in reporting period in the ad-hoc query.
CALL FUNCTION 'RH_READ_HRP1002'
EXPORTING
act_plvar = '01'
act_otype = 'S'
act_objid = p0001-plans
act_subty = '0002'
act_langu = 'E'
act_begda = syhr_evaluation_begda
act_endda = syhr_evaluation_endda
TABLES
act_p1002 = itab_plans
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
But when coding the above getting syntax error
Field "SYHR_EVALUATION_BEGDA" is unknown. It is neither in one of the
specified tables nor defined by a "DATA" statement.
But when putting break point above this call fm step, we are getting value for both syhr_evaluation_begda and syhr_evaluation_endda.
Kindly advice.
Thanks,
Anju
Hi Team,
We have a client requirement to include an additional field in our ad-hoc query to fetch the descritpion for position from hrt1002 table for this we are using fm RH_READ_HRP1002 to first fetch details from hrp1002 table under node for org assignment.
in parameter act_begda and act_endda need to pass the value choosen in reporting period in the ad-hoc query.
CALL FUNCTION 'RH_READ_HRP1002'
EXPORTING
act_plvar = '01'
act_otype = 'S'
act_objid = p0001-plans
act_subty = '0002'
act_langu = 'E'
act_begda = syhr_evaluation_begda
act_endda = syhr_evaluation_endda
TABLES
act_p1002 = itab_plans
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
But when coding the above getting syntax error
Field "SYHR_EVALUATION_BEGDA" is unknown. It is neither in one of the
specified tables nor defined by a "DATA" statement.
But when putting break point above this call fm step, we are getting value for both syhr_evaluation_begda and syhr_evaluation_endda.
Kindly advice.
Thanks,
Anju
2013 Nov 18 6:20 AM
where are you coding this..You need to declare them as variables in data declaration..While compiling the compiler is not able to find the variable declartion. Declare them of same type function module needs
2013 Nov 18 7:52 AM
Hi Anju,
Please check the Blogs
http://scn.sap.com/community/erp/hcm/blog/2008/06/16/sap-adhoc-query-sq01-sq02-sq03
http://scn.sap.com/docs/DOC-35463
They cover the concept of adding new fields to existing Ad-hocs and usage of local variables in queries
Regards
2013 Nov 18 9:09 AM
Hi Anju,
I think for your scenario you can use SQVI, By this tcode you can get it all information from any table if it is possible try to use.
Best Regards
Mohan
2013 Dec 07 4:17 PM
Hi,
Kindly follow below link to write query
Sequence like SQ03 - 1,2,3...., SQ02 - 1,2,3,........,SQ01 - 1,2,3,4.........
Postimage.org / gallery - SQ 01 1, SQ 01 2, SQ 01 3, SQ 01 4, SQ 01 5, SQ 01 6, SQ 01 7
If still you have doubts kindly let me know
Yours
Mohan