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: 

problem in F4 help using RH_OBJID_REQUEST

Former Member
0 Kudos
475

Hello,

I have implemented a custom F4 search help for an HR object parameter and used fm RH_OBJID_REQUEST to read related objects. The user can select multiple objects. I have debugged th eprogram, the return table have all he selected values but after I send the values to the low value of the select option not all are displayed and some values repeat themselves.

My code is as follows:

FORM competency_f4 USING p_fieldname CHANGING p_value .

DATA: BEGIN OF ls_objec OCCURS 0.

INCLUDE STRUCTURE objec .

DATA: END OF ls_objec.

CALL FUNCTION 'RH_OBJID_REQUEST'

EXPORTING

plvar = '01'

otype = 'Q'

dynpro_repid = sy-repid

dynpro_dynnr = sy-dynnr

  • dynpro_searkfield = p_fieldname

set_mode = 'X'

TABLES

sel_objects = ls_objec

EXCEPTIONS

cancelled = 1

wrong_condition = 2

nothing_found = 3

internal_error = 4

illegal_mode = 5.

CHECK sy-subrc EQ 0 .

LOOP AT ls_objec.

CLEAR compt.

compt-sign = 'I'.

compt-option = 'EQ'.

compt-low = ls_objec-objid .

APPEND compt.

ENDLOOP.

*CLEAR compt.

ENDFORM. "COMPETENCY_F4

What can be the problem?

Thx in advance,

Ali

1 ACCEPTED SOLUTION

varma_narayana
Active Contributor
0 Kudos
134

Hi ...

Change the code like below..

<b>REFRESH COMPT.</b> "Add this ...

LOOP AT ls_objec.

CLEAR compt.

compt-sign = 'I'.

compt-option = 'EQ'.

compt-low = ls_objec-objid .

APPEND compt.

ENDLOOP.

REWARD IF HELPFUL

3 REPLIES 3

Former Member
0 Kudos
134

I solved it on my own

0 Kudos
134

Hi there,

Really hoping you read this reply - how did you solve this problem?  I'm also having the problem.

Thanks so much!

varma_narayana
Active Contributor
0 Kudos
135

Hi ...

Change the code like below..

<b>REFRESH COMPT.</b> "Add this ...

LOOP AT ls_objec.

CLEAR compt.

compt-sign = 'I'.

compt-option = 'EQ'.

compt-low = ls_objec-objid .

APPEND compt.

ENDLOOP.

REWARD IF HELPFUL