2005 Apr 03 2:22 PM
Hi Great minds,
How can i achieve this requirement in a report.
Scenario is :
On the Initial screen there is this accumulated value of PR and PO quantities for a paricular period(that way i have monthly break up quantities for 5 months per material).
And the reqruirement now is when i click on that value i should be able to see all those PR's and PO's which resulted in that accumaulation.
I know it has to be addressed thru At line -selection,but the value is not a field in internal table.
Please help...Thanks
Hi Great minds,
How can i achieve this requirement in a report.
Scenario is :
On the Initial screen there is this accumulated value of PR and PO quantities for a paricular period(that way i have monthly break up quantities for 5 months per material).
And the reqruirement now is when i click on that value i should be able to see all those PR's and PO's which resulted in that accumaulation.
I know it has to be addressed thru At line -selection,but the value is not a field in internal table.
Please help...Thanks
2005 Apr 03 4:08 PM
Have you alreday checked the documentation of the HIDE command. If you use global variables for hiding some information together with the list output the content of those variables is restored.
Best Regards
Klaus
2005 Apr 04 12:10 PM
Hi,
Thanks for ur reply.
I tried to do this further,but the only problem iam facing now is with the dates.
Its only returning me the last dates ie 5th months in At Line-selection.
The accumaulated quantities for all 5 months is on same line.
Anyone please help...
Message was edited by: srinivas kandla
2005 Apr 04 12:31 PM
Hi Srinivas,
You must place hide-command in your output-loop:
So here's your output.
Loop at itab.
Write: / itab-f1 , itab-f2
.
<b>Hide : itab-f1.</b>
Endloop.
At line-selection.
Loop at stab where f1 = itab-f1
...
-> example in SAP: report
DEMO_LIST_HIDE
Regards
2005 Apr 04 2:36 PM
Hi,
Here's the partial code where iam trying to get the dates in At-line Selection.
*****
FORM MRP USING VALUE(L_DATE) VALUE(H_DATE).
DO.
if h_date(6) ge l_date(6).
perform LAST_DAY_IN_MONTH in program SAPFP500
USING l_date
com_month-endda.
select a~menge into ekpo-menge from ekpo as a inner join eket as b on
aebeln = bebeln and aebelp = bebelp
where a~matnr = itab1-matnr
and b~eindt between l_date and com_month-endda
and a~loekz ne 'X'.
po_quan = po_quan + ekpo-menge.
endselect.
write : po_quan.
hide : l_date,com_month-endda.
clear : po_quan.
else.
clear : l_date,h_date.
exit.
endif.
ENDDO.
ENDFORM.
******
In the above code when i click on "po_quan" i must be able to get all the PO's in that partuclar month per material.
Now in the At Line-selection iam getting the final iteration dates(ie last month only).
please advice...
2005 Apr 04 3:01 PM
Hi Srinivas,
Try this one,
Declare a global variable for material.
Data: v_matnr like ekpo-matnr.
And while displaying PO_Quantity,use WRITE material to V_MATNR (WRITE: ITAB1-MATNR TO V_MATNR), instead of displaying. and then HIDE this variable V_MATNR like L_DATE.
In at line selection use the variable for V_MATNR for fetching the PO's related to material
Thanks
Lakshman
2005 Apr 04 3:31 PM
Hi Lakshman,
The problem is not with the material number,thats comming in At line-selection.Its the date range which iam not getting for that particular months po_quan.
2005 Apr 04 8:09 PM
This can be solved if you try ALV.I would say go with ALV List using Function module.
Collect data into internal table .
Pass this table to ALV as per your requirment (Columns will be months and row will be quanity.You have to finalise the no of columns that you are going to display)
Build another internal which will have Month and related POs collected.
you can handle double click event of ALV,which will give you Column and row information ( which row and column is double clicked)
Now you can read 2nd internal table for selected column ( which in turn is Month) show all the PO's as second list.
2005 Apr 05 7:10 AM
Hi,
If you are getting the material number, then try to populate the date intervals , material number and the required fields in a internal table . After that try to read that from the internal table for the corresponding material number. I didn't try this.If possible, make a try.
Rgds,
J.Jayanthi
2005 Apr 05 5:41 AM
Hi Sushil,
Switching over to ALV at this stage is again going to be a long process.And to be frank iam not very good in ALV's.
Isn't there any way to address this issue...!!!
Anyone please advice.
2005 Apr 05 6:11 AM
Hello Srinivas,
I've been trying to understand what exactly your problem is. Let me give you something to the extent that I have understood it.
DO.
IF H_DATE(6) GE L_DATE(6).
PERFORM LAST_DAY_IN_MONTH IN PROGRAM SAPFP500 USING L_DATE
COM_MONTH-ENDDA.
SELECT A~MENGE
INTO EKPO-MENGE
FROM EKPO AS A INNER JOIN
EKET AS B ON A~EBELN = B~EBELN AND
A~EBELP = B~EBELP
WHERE A~MATNR = ITAB1-MATNR
AND B~EINDT BETWEEN L_DATE AND COM_MONTH-ENDDA
AND A~LOEKZ NE 'X'.
PO_QUAN = PO_QUAN + EKPO-MENGE.
ENDSELECT.
<b>WRITE : / PO_QUAN.</b>
HIDE : L_DATE,COM_MONTH-ENDDA.
CLEAR : PO_QUAN.
ELSE.
CLEAR : L_DATE,H_DATE.
EXIT.
ENDIF.
ENDDO.Just try the above piece of code and I think you should get it working. the difference , as I have made it bold, is the WRITE statement.
Regards,
Anand Mandalika.
2005 Apr 06 6:08 AM
Hi Anand,
I cannot write the quantities for each month in next line.For every material the break up quantities for 5 months should be in the same line..
Anyways i found some solution for this,what iam planning to do is AT line-selection, take all the PO's and PR's for a particular Material for the full 5 months and show
them separately on monthly basis in that.
I hope the Users like this...
Thanks guys,for all your support.
2005 Apr 06 7:29 AM
Hi Srinivas,
I am not having SAP Environment with me right now, but you try if this solution works for you.
First to get your requirement, i guess your report is in this fashion
1 2 3 4 5
M1 501 502 503 504 505
M2 601 602 603 604 605
M3 701 702 703 704 705
Now, when you click on any thing like 602, it should give you the material and PO for the date range in Month 2.
I guess you can use the internal table with following structure.
Material Number
Dateinterval1
Dateinterval2
Dateinterval3
Dateinterval4
Dateinterval5
Every time you process, store the information in this table.
Now in line selection you can get the following value:
a) Current Row and from there you can get the Material Number.
b) Current Column and from there you can get what date interval is being refered.
In this case you wont need to use hide.
Let me know if i am answering your query.
Regards
Mitesh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |