on 10-02-2015 9:50 AM
Hi All,
Kindly help me out with following issue .
Following is the code in custom method.
when i execute the method in SE24 i get value in init_mail and last_releasecode.
But during the execution of workflow the value is <not set> in workflow container.
I have executed the particular task in SWUS and there too the workflow container value for mail and releasecode is <not set>.
I have checked the data type and binding at task level.
I have attached the screenshot of workflow container for reference.
Why the value is not set in workflow container from custom method
TYPES: BEGIN OF ty_t16fw,
frgco TYPE t16fw-frgco,
objid TYPE t16fw-objid,
END OF ty_t16fw.
TYPES: BEGIN OF ty_usr21,
bname TYPE usr21-bname,
persnumber TYPE usr21-persnumber,
addrnumber TYPE usr21-addrnumber,
END OF ty_usr21.
TYPES : BEGIN OF ty_adr6,
addrnumber TYPE adr6-addrnumber,
persnumber TYPE adr6-persnumber,
smtp_addr TYPE adr6-smtp_addr,
END OF ty_adr6.
DATA: wa_ekko TYPE ekko,
wa_t16fw_ini TYPE ty_t16fw,
wa_usr21_ini TYPE ty_usr21,
wa_adr6_ini TYPE ty_adr6.
SELECT SINGLE * FROM ekko
INTO wa_ekko
WHERE ebeln = purchaseorder
AND frgke = 'R'.
IF wa_ekko IS NOT INITIAL.
SELECT SINGLE frgco objid FROM t16fw
INTO wa_t16fw_ini
WHERE frgco = 'C1'.
SELECT SINGLE bname persnumber addrnumber FROM usr21
INTO wa_usr21_ini
WHERE bname = wa_t16fw_ini-objid.
SELECT SINGLE addrnumber persnumber smtp_addr FROM adr6
INTO wa_adr6_ini
WHERE addrnumber = wa_usr21_ini-addrnumber
AND persnumber = wa_usr21_ini-persnumber.
init_mail = wa_adr6_ini-smtp_addr.
CASE wa_ekko-frgsx.
WHEN 'Q1'.
last_releasecode = 'C1'.
WHEN 'R1'.
last_releasecode = 'C2'.
WHEN 'S1'.
last_releasecode = 'C3'.
WHEN 'T1'.
last_releasecode = 'C4'.
WHEN 'U1'.
last_releasecode = 'C5'.
WHEN 'V1'.
last_releasecode = 'C6'.
WHEN 'W1'.
last_releasecode = 'C7'.
ENDCASE.
ENDIF.
Thanks,
Madhu
"when i execute the method in SE24 i get value in init_mail and last_releasecode.
But during the execution of workflow the value is <not set> in workflow container."
That will be a binding problem. Hardcode some values into your method to be sure - it could also be that your method isn't returning the values.
(You're doing too much straight selecting from table - you should use some BAPI* fms instead.
But that's another matter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.