on 08-11-2011 10:39 AM
Dear Gurus,
form name: ZMEDRUCK copied from MEDRUCK
Report program: SAPFM06P
PO output type: NEU
Who released the purchase order? I want to add this field into ZMEDRUCK
(I tried to add CDHDR-USERNAME, But it is not showing).
Can anybody help me?
Bishnu
11/08
Hi
you need to use a code inside your form to get the name of the person who released the PO.
Find information about PERFORM in sapscript.
I give a hit.
in your form
/: DEFINE &L_NAME&
/: DEFINE &L_NAME2&
/: PERFORM GET_RELEASED IN PROGRAM ZMM_001
/: USING &L_NAME&
/: CHANGING &L_NAME2&
/: ENDPERFORM
in se38,
FORM GET_RELEASED TABLES input_table STRUCTURE itcsy
output_table STRUCTURE itcsy.
* Put your code here to get the released of the PO
ENDFORM.
Regards
Miguel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Miguel,
Thanks for your kind reply. And please check my code.
Below the code I applied but yet not the result show in print:
PERFORM GETID IN PROGRAM ZCAL_PO_REL_ID
USING &EKKO-EBELN&
CHANGING &S_ID&
ENDPERFORM
&S_ID&
REPORT ZCALL_PO_REL_ID.
TABLES cdhdr.
FORM getid TABLES in_tab STRUCTURE ITCSY out_tab STRUCTURE ITCSY .
READ TABLE in_tab INDEX 1.
SELECT SINGLE * FROM cdhdr WHERE objectid = in_tab-value and tcode eq 'ME28'.
IF sy-subrc EQ 0.
READ TABLE out_tab INDEX 1.
MOVE cdhdr-username TO out_tab-value.
MODIFY out_tab INDEX 1.
ENDIF.
ENDFORM.
from your code, this
SELECT SINGLE * FROM cdhdr WHERE objectid = in_tab-value and tcode eq 'ME28'
. is obviously failing.
I can't try this out in my system....not a PP user, but wouldn't you want to check the system status for RELEASED (perhaps REL), and find the UNAME for the person who set that status? You could go to table JEST with the number of the status code for the REL text (from table TJ02/TJ02T), and/or table JCDS for the history of that status, to find out who made the change/set a particular status. Remember to check for the INACT = OFF...you don't want to report status settings that are not active.
And for your define, write the statement in the window where your perform would be called, like:
DEFINE &S_ID& = ' '
then your perform
Edited by: DaveL on Aug 15, 2011 5:14 PM
Dear All,
Now it is okay.
Thanks to everybody.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check EKKO-frgsx.
BR
Dep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.