‎2008 Apr 30 4:11 PM
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.
‎2008 Apr 30 4:15 PM
Do something like this:
CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
TABLES
pobjid = r_pobjid.
p_orgeh[] = r_pobjid[].Regards,
Ravi
‎2008 Apr 30 4:15 PM
Do something like this:
CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
TABLES
pobjid = r_pobjid.
p_orgeh[] = r_pobjid[].Regards,
Ravi
‎2008 Apr 30 4:16 PM
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.
‎2008 Apr 30 4:19 PM
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
‎2008 Apr 30 4:39 PM
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
‎2008 Apr 30 4:17 PM
Hi,
You can try this way :
p_orgeh[] = r_pobjid[].Regards,
Nicolas
‎2008 Apr 30 4:21 PM
Hi all
this is not working very well.
p_orgeh[] = r_pobjid[].The last value disappears.
Regards
ertas
‎2008 May 01 1:41 AM
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
‎2008 May 01 3:39 AM
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
‎2008 May 01 9:54 AM
Is that the reason for seeing first value in the select options
input field.
‎2008 May 01 2:57 PM
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.