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

pass return table to SELECT-OPTIONS field

Former Member
0 Likes
1,441

Dear Experts,

how can I pass the retunr table r_pobjid to

SELECT-OPTIONS's p_orgeh ?

Regards

ertas

SELECT-OPTIONS   p_orgeh   FOR    P0001-orgeh.

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

  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = r_pobjid.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,405
REPORT  ztest.
DATA: lv_orgeh TYPE orgeh.

SELECT-OPTIONS   p_orgeh   FOR    lv_orgeh NO INTERVALS.
SELECT-OPTIONS: pnpobjid FOR lv_orgeh NO-DISPLAY.           "XJFK12258

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

  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = p_orgeh[].
14 REPLIES 14
Read only

Former Member
0 Likes
1,405

Hi

by using FM F4IF_INT_TABLE_VALUE_REQUEST

Regards,

Sunil

Read only

naimesh_patel
Active Contributor
0 Likes
1,405

Assign the value to the select options.

Like:


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.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
1,405

Have you tried this?


p_orgeh[] = r_pobjid[].

Edited by: Paul Chapman on Apr 30, 2008 10:27 AM

Read only

Former Member
0 Likes
1,405

Hi,

Have a look on the following code

parameters: kunnr like kna1-kunnr.

start-of-selection.

do some operations.

load-of-program.

kunnr = '10045647'.

<REMOVED BY MODERATOR>

Thanks,

Chandu

Edited by: Alvaro Tejada Galindo on Apr 30, 2008 11:16 AM

Read only

Former Member
0 Likes
1,406
REPORT  ztest.
DATA: lv_orgeh TYPE orgeh.

SELECT-OPTIONS   p_orgeh   FOR    lv_orgeh NO INTERVALS.
SELECT-OPTIONS: pnpobjid FOR lv_orgeh NO-DISPLAY.           "XJFK12258

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

  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = p_orgeh[].
Read only

Former Member
0 Likes
1,405

Naimesh Patel I'm sorry but it dint't work !

Regards

ertas

Read only

Former Member
0 Likes
1,405

Perhaps this too


  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = p_orgeh.

Read only

0 Likes
1,405

Paul Chapman one entry is getting lost always do you know why ?

Read only

Former Member
0 Likes
1,405

I'm sorry but nothing of these replies were correctly !

The problem is still existing.

Regards

ertas

Read only

0 Likes
1,405

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,405

this is working for me !!!

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

Former Member
0 Likes
1,405
SELECT-OPTIONS   p_orgeh   FOR    P0001-orgeh.
 
Initialization.
 
  CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'
    TABLES
      pobjid = r_pobjid.

p_orgeh[] = r_pobjid[].

Try as above.

Read only

0 Likes
1,405

I have already one Initialization block in my code this would be the second one.

Read only

0 Likes
1,405

Hi,

Take the Ravi's example

SELECT-OPTIONS p_orgeh FOR P0001-orgeh.

Initialization.

CALL FUNCTION 'RP_PNP_ORGSTRUCTURE'

TABLES

pobjid = r_pobjid.

load-of-program.

p_orgeh[] = r_pobjid[].

<REMOVED BY MODERATOR>

thanks,

Chandu

Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:53 PM