‎2007 Nov 20 8:53 PM
Hi,
I'm taking project number in selecton option. I am working on a report in which i have to display on those projects which are mentioned in select option.
The data in the EKKN table is not stored directly based on project, infact on wbs or network. based on netwrork or wbs i'll find project. But then i have to delete all the project which are not in select options.
How can i do that?
How can i loop on select option if user has given,,,e.g 40001 to 9000 in project select option.
I have to built the logic like ME2J report, it takes project as a input and dispaly PO related data.
Pls suggets....
Message was edited by:
Sal Khan
‎2007 Nov 20 8:56 PM
‎2007 Nov 20 9:00 PM
In that case you have to take all the projects which are there in the internal table (from WBS ) based on your select option.
Like:
IT_PROJ
4000
4001
4004
4008
...
8899Then use this internal table for selection with FOR ALL ENTRIES IN IT_PROJ addition in select.
Regards,
Naimesh Patel
‎2007 Nov 20 9:13 PM
Satish,
I have one internal table, which has PO 's information along with account assignment catagory, accts assmt cat = P or N, it means it's related to Project, bcoz we can't directly enter Project number at the time of PO creations. Now I have one select option for project, so the user can filter the reprot based on projects also, just like me2J.
Now I want to show only those projects which are there in selection option, and delete rest.
Patel,
If user has given range, how can i query. I mean i have to populate the itab programitcally???
Or if you can see ME2J, how they are fetching the records???
Thanks
‎2007 Nov 20 9:22 PM
Hi,
First Get data from PRPS as below
Select-options: s_prdef for PRPS-PSPHI.
SELECT pspnr posid psphi stufe werks matnr FROM prps
INTO TABLE git_prps
WHERE psphi in s_prdef
* Fetch POs for WBS elements
SELECT ebeln loekz aufnr ps_psp_pnr
FROM ekkn
INTO TABLE git_ekkn
FOR ALL ENTRIES IN git_prps
WHERE ebeln IN r_ebeln
AND ebelp IN r_ebelp
AND zekkn IN r_zekkn
AND ps_psp_pnr = git_prps-pspnr.In the above code you have already filtered the Projects, so you will get PO details based on those projects only.
Is this you are expecting? Pls let me know if i have mistaken...
Regards,
Satish
‎2007 Nov 20 9:59 PM