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

Problem in InfoSet Query data

Former Member
0 Likes
1,219

Hello All,

I have a specification to develop an infoset query in HR.The problem i am facing is i need particular PERNR's listed in output of query which satisfy few condtions like p000-massn = 31 and p0000-massg = Ub or Uc. this is an example of one condition. I tried to wirte my code in record processing and end of selection( before listing) . but there is no data coming at all.

Please suggest how to go about this .

Thanks in advance

Nidhi.

11 REPLIES 11
Read only

former_member215917
Active Participant
0 Likes
1,118

Hi Nidhi,

P0000 is a structure and not the table. Check whether you are using right tables e.g. PA0000, PA0001 etc.

Gouri.

Read only

0 Likes
1,118

Hello gauri ,

I am writing my code like this in start of selection coding space in the infoset.

rp_provide_from_last p0000 space pnpbegda pnpbegda.

If P0000-MASSN = '31' AND ( P0000-MASSG = 'UB' or P0000-MASSG = 'UC' )

OR P0000-MASSN = '91' AND P0000-MASSG = 'UE'

OR P0000-MASSN = '10' AND P0000-MASSG = 'U2'.

ELSE.

reject.

endif.

Read only

0 Likes
1,118

Hello,

I guess, you need to write the below code first before rp_provide_from_last

GET <Logical database table>

GET PERNR.

Cheers,

Balaji

Read only

0 Likes
1,118

Hello Balaji ,

But the infoet is using the standard LDB .

Read only

0 Likes
1,118

Hello Nidhi,

while creating the infoset in SQ02, are you giving the LDB PNPCE or PNP?

In normal SE38, programing, if you use LDB PNP, then you should write GET PERNR. This will retrieve all the data from infotypes 0000, 0001 and 0002.

Please try adding GET PERNR in the START OF SELECTION. Also try writing the code rp_provide_last in START OF SELECTION.

Cheers,

Balaji

Read only

0 Likes
1,118

Hi Nidhi,

Please write your code in Record Processing event of code section of Infoset . And instead of IF , use CHECK condition statement.

CHECK P0000-MASSN = '31' AND ( P0000-MASSG = 'UB' or P0000-MASSG = 'UC' )

OR P0000-MASSN = '91' AND P0000-MASSG = 'UE'

OR P0000-MASSN = '10' AND P0000-MASSG = 'U2'.

CHECK SY-SUBRC EQ 0.

Read only

0 Likes
1,118

Hi Nidhi,

Please write your code in Record Processing event of code section of Infoset . And instead of IF , use CHECK condition statement.

CHECK P0000-MASSN = '31' AND ( P0000-MASSG = 'UB' or P0000-MASSG = 'UC' )
OR P0000-MASSN = '91' AND P0000-MASSG = 'UE'
OR P0000-MASSN = '10' AND P0000-MASSG = 'U2'.

CHECK SY-SUBRC EQ 0.

Edited by: Dinesh Tiwari on Oct 1, 2009 1:42 PM

Read only

0 Likes
1,118

Hi Nidhi,

Please check if given logic solves your issue.

Regards.

Dinesh

Read only

Former Member
0 Likes
1,118

Hi,

As per my past work you need not write any code in 'end of selection' however you can put such conditions within field itself i.e., after designing the infoset right click to the field you want to set filter for, choose "Queries for field" option and write your filtering criteria. While execution infoset will process the records based on this condition(s).

Let me know if it suits to your requirement.

Rgds

Sudhanshu

Read only

0 Likes
1,118

Hello Sudhanshu,

I am right clicking on the filed in the infoset and choosing queries of the field.Then it is taking me to the screen of directories of queries for field &p0000-massn . and it is an alv lis of 5 columns with infoset name , field name , user group , query name and query property. Here if i right click on the ifled name and choose set filter , even after i enter values like 31, 91 ,and 10 it is not working .Could you please guide me more on this . i need to finish this requeire ment as earliest as possible .

thanks in advance .

Read only

Former Member
0 Likes
1,118

Hi Nidhi,

Did you try to implement the mentioned logic? Let me know if you need any more information.

Regards,

Dinesh