Application Development and Automation 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: 
Read only

value disappears

Former Member
0 Likes
1,294

Hello,

in p_orgeh is always one value disappearing. It is always has some values less than r_pobjid.

Usually it might have after the assigment all the same values as like as r_pobjid.

Do know why ?

Thanks

ertas

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_orgeh-low.
 
  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = r_pobjid.
 
  p_orgeh-low = r_pobjid.
  p_orgeh-sign = 'I'.
  p_orgeh-option = 'EQ'.
  append p_orgeh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,251

Do something like this:

CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = r_pobjid.

p_orgeh[] = r_pobjid[].

Regards,

Ravi

10 REPLIES 10
Read only

Former Member
0 Likes
1,252

Do something like this:

CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = r_pobjid.

p_orgeh[] = r_pobjid[].

Regards,

Ravi

Read only

Former Member
0 Likes
1,251

We only get one result from the FM, so to make it visible, this works


TABLES: p0001.
RANGES:
  r_pobjid FOR p0001-orgeh.

SELECT-OPTIONS   p_orgeh   FOR    p0001-orgeh.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_orgeh-low.

  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
       TABLES
            pobjid = p_orgeh.
  read table p_orgeh index 1.

Read only

0 Likes
1,251

hi chapmann where do you know that user selects only one value ?

What happens in case of selecting ten org units. You read only one this is not good.

It allows to select many org.units

Regards

ertas

Read only

0 Likes
1,251

I ran this and selected all 4 of the check boxes in our system.

After I ran it, the Range had 4 rows in it. I'm not real familiar with this field and what I was to expect.

When I run this code


TABLES: p0001.
RANGES:
  r_pobjid FOR p0001-orgeh.

SELECT-OPTIONS   p_orgeh   FOR    p0001-orgeh.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_orgeh-low.

  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
       TABLES
            pobjid = p_orgeh.
  READ TABLE p_orgeh INDEX 1.


START-OF-SELECTION.
  LOOP AT p_orgeh.
    WRITE:/1 p_orgeh.
  ENDLOOP.

Viewing TABLE p_orgeh I get this


IEQ1000002500000000 
IEQ1000082300000000 
IEQ1002154600000000 
IEQ1002154700000000 

Read only

Former Member
0 Likes
1,251

Hi,

You can try this way :

p_orgeh[] = r_pobjid[].

Regards,

Nicolas

Read only

Former Member
0 Likes
1,251

Hi all

this is not working very well.

p_orgeh[] = r_pobjid[].

The last value disappears.

Regards

ertas

Read only

Former Member
0 Likes
1,251

hi chapmann what makes

READ TABLE p_orgeh INDEX 1 exactly

Is it the reason for seeing any value in the select options

input field

Regards

ilhan

Read only

0 Likes
1,251

Hi Ilhan Ertas ,

READ TABLE p_orgeh INDEX 1.

This statement gets only one record from P_ORGEH.

it gets only the first record as we mentioned the index 1.

if we give Index 2 then it fetches the Second Record.

Hope this helps...

Best regards,

raam

Read only

Former Member
0 Likes
1,251

Is that the reason for seeing first value in the select options

input field.

Read only

0 Likes
1,251

Yes Ilhan.

This made it visible just so you know something was retreived.

If you push the grey square button with the yellow arrow in it after you F4/Search Help, you will see all the records retrieved and show in the range and you can the use it as

IF xxx IN p_orgeh.

or

select * into somewhere from yourtable

where xxx in p_orgeh.