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: 

Org Unit Selection-Option

Former Member
0 Kudos

Hi,

I have a custom report that has org-unit on the selection-screen. (i tried 2 different declarations)

s_org FOR pa0001-orgeh,

s_org FOR pernr-orgeh,

Neither of the above declarations give me what I need on F4/Drop-Down. They simply give a list of all org units and not the structural seach drop-down I need! Adding the org-unit button to the menu bar isn't an option we want.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Try this code:-

TABLES: PA0001.
DATA: T_RHMC2 LIKE RHMC2 OCCURS 0 WITH HEADER LINE.
DATA: T_HRPE_TXSBJ LIKE HRPE_TXSBJ OCCURS 0 WITH HEADER LINE.

SELECT-OPTIONS:  S_ORG FOR PA0001-ORGEH.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ORG-LOW.

  CALL FUNCTION 'RHP0_POPUP_F4_SEARK'
    EXPORTING
      F4          = 'X'
      PLVAR       = '01'
      OTYPE       = 'O'
    TABLES
      BASE_OBJIDS = T_RHMC2
      SEL_OBJIDS  = T_HRPE_TXSBJ
    CHANGING
      OBJID       = S_ORG-LOW.

11 REPLIES 11

Former Member
0 Kudos

could you please explain what exactly u need?

GauthamV
Active Contributor
0 Kudos

Append the values you required in f4 help to an internal table and just pass it to this FM.

F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Kudos

HI,

Try this ..

TABLES : T527X.
SELECT-OPTIONS : s_org FOR T527X-orgeh.

0 Kudos

he says he is already getting the F4...

he has some other expectations i guess

Former Member
0 Kudos

Check out the following search helps.

HRPADUN_KOSTWOU

H_T527X

H_T527X_1

PREMK

PREMPE

PREMS

Can you provide us any screen where you have seen the Search help you desired?

former_member229729
Active Participant
0 Kudos

>

> Hi,

>

> I have a custom report that has org-unit on the selection-screen. (i tried 2 different declarations)

> s_org FOR pa0001-orgeh,

> s_org FOR pernr-orgeh,

>

> Neither of the above declarations give me what I need on F4/Drop-Down. They simply give a list of all org units and not the structural seach drop-down I need! Adding the org-unit button to the menu bar isn't an option we want.

>

> Thanks

Hi,

The below given coding gives F4/Drop-down correctly. Please check:

TABLES:  pa0001,
         pernr.
SELECT-OPTIONS:
          s_org   FOR pa0001-orgeh,
          s_org1 FOR pernr-orgeh.

Rgds,

Ramani N

Former Member
0 Kudos

I basically need the F4 that PNPCE logical database used. This program is a copy of a standard program which used PCH, so I cant change that.

T527 doesn't work either unfortunatly. I can't attached a screen-shot of the correct one, is there a way?

Former Member
0 Kudos

Hi,

to get the org structure as f4 help. suppose your screen field is s_org_unit.

Write the below event in your program.

at selection-screen on value request for s_org_unit.

call the function module RH_OBJID_REQUEST after this line. just pass PLVAR as 01 and OTYPE as 'O'. rest of the parameters are optional and you can fill it as per ur requirement.

selected org unit will come in exporting parameter SEL_OBJECT.

Thanks

Vishal Kapoor

Former Member
0 Kudos

Hi

Try this code:-

TABLES: PA0001.
DATA: T_RHMC2 LIKE RHMC2 OCCURS 0 WITH HEADER LINE.
DATA: T_HRPE_TXSBJ LIKE HRPE_TXSBJ OCCURS 0 WITH HEADER LINE.

SELECT-OPTIONS:  S_ORG FOR PA0001-ORGEH.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ORG-LOW.

  CALL FUNCTION 'RHP0_POPUP_F4_SEARK'
    EXPORTING
      F4          = 'X'
      PLVAR       = '01'
      OTYPE       = 'O'
    TABLES
      BASE_OBJIDS = T_RHMC2
      SEL_OBJIDS  = T_HRPE_TXSBJ
    CHANGING
      OBJID       = S_ORG-LOW.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Use

parameters p_orgeh type orgeh matchcode object H_T527X.

Former Member
0 Kudos

Hi Please ref the below link in which i have write the logic with example that shows Org Structue in F4

http : // w w w.saptechnical.com/Tips/ABAP/F4/ObjID.htm.

TABLES : hrp1001.

DATA : subrc TYPE sysubrc.

SELECT-OPTIONS : so_obj_o FOR hrp1001-objid NO INTERVALS.

PARAMETERS: pchplvar LIKE pchdy-plvar NO-DISPLAY,

pchotype LIKE pchdy-otype NO-DISPLAY.

INCLUDE rhxmacro.

INITIALIZATION.

pchplvar = '01'.

pchotype = 'O'." "O" is org unit "S" is for position etc..

rhx-f4-objid-data.

*--F4 help for OBJID

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

rhx-f4-objid-low pchplvar pchotype so_obj_o '' ''.