2015 Jun 15 6:30 AM
Hi Experts,
How to identify whether the status selected for status inclusive i.e match code object I_STATUS is user status or system status?
As I need both system as well as user status in f4 help.I want to know how to validate whether the user has selected an system status or user status in select-option.
Thanks & Regards,
Sonali Deshmukh
2015 Jun 15 6:44 AM
Hi Sonali,
Just go into 'I_STATUS', it`s a collective SH. one is from system, another is from user.
Then you go into their search help exit. you will find that TJ04 stored status of system, TJ30 stored status of user. Ok, you can 'SELECT SINGLE' to identify it now.
regards,
Archer
2015 Jun 15 7:17 AM
Hi Archer,
Thank you for the quick reply.
I have applied these standard serach help of status inclusive and status exclusive in my custom report.
I want to use the same functionality as in IW38 tcode for status inclusive and status exclusive.
My question is when I select the User/System status through F4 help then in my code how I will validate further whether the selected status in select-option is User Status or System status.
Thanks & Regards,
Sonali Deshmukh
2015 Jun 15 8:47 AM
PARAMETERS p_status MATCHCODE OBJECT i_status.
AT SELECTION SCREEN ON p_status.
SELECT SINGLE xx INTO g_status
FROM tj04
WHERE ISTAT = p_status.
IF sy-subrc EQ 0.
"it`s system status.
ELSE.
SELECT SINGLE xx INTO g_status
FROM tj30
WHERE ESTAT = p_status.
IF sy-subrc EQ 0.
"it`s user status.
ENDIF.
ENDIF.
Please check above code, works for you?
Archer
2015 Jun 15 12:51 PM
Hi Thank you for the reply.
I am having as select-option so select single will not work for me.
Also some status are common in both system and user, but I need to get the exact one.
Also , we select user status based on status profile..so can we determine from which status profile we have selected the user status.
For eg:
statprofile1 = CRTD - E006
statprofile2 = CNCL - E006.
Now I have selected CRTD status profile from f4 help, but in my select option I will get only E006 code.
so if I will pass this code to tj30 then i will get 2 records..but I want onlt one record which I have selected.
Is it possible?
I am debugging the standrad code for RIAUFK20 and checking how standard works.:)
Thanks & Regards,
Sonali Deshmukh
2015 Jun 15 1:29 PM
First, system will identify object type either from main program name (e.g. ORI for RIAUFK20) or from memory id PM_OBTYP (form GET_OBTYP of function group IMCH)
Then
AFAIK only external format of status is exported (the search help exit doesn't manage DISP step, only SELECT step is handled)
Hint: Some search help as H_TJ30 also return the schema, but found none with mixed system/user status.
Regards,
Raymond