04-09-2010 8:47 AM
Hi,
Good day sap guys
thank you for alot of supporting. Ive dev the user exit for iw32 for creating the settelment rules. ruels are creating except cost center.. before i was posted this queary. some one told tht pass the set parameter..
Even ive passed the set parameter.. i didnt get the value.. can any plz tell me if any wrong in below statement.
set parameter id 'KOS' field caufvd_imp-kostv.
Thank you
Regards
04-09-2010 9:01 AM
04-09-2010 9:01 AM
04-09-2010 9:07 AM
Thank you very much for reply. but ive got doubt, if it pass the set paramter id to the itab. doest it work it out?
if you dont mind, can plz check my code
Loop at lt_zcs_settle_rc into wa_zcs_settle_rc.
IF wa_zcs_settle_rc-auart = 'YSPS'.
wa_srules-source = wa_zcs_settle_rc-RULE_TYPE.
wa_srules-settl_type = 'PER'.
wa_srules-percentage = '100'.
wa_srules-comp_code = caufvd_imp-bukrs.
wa_srules-gl_account = wa_zcs_settle_rc-hkont.
wa_srules-profit_ctr = caufvd_imp-prctr.
set parameter id: 'KOS' field caufvd_imp-kostv. "Here iam passing the parameter id for getting the cost center
APPEND wa_srules TO srules.
CLEAR:wa_srules.
wa_srules-source = wa_zcs_settle_rc-RULE_TYPE.
wa_srules-settl_type = 'FUL'.
wa_srules-percentage = '100'.
wa_srules-comp_code = caufvd_imp-bukrs.
wa_srules-gl_account = wa_zcs_settle_rc-hkont.
wa_srules-profit_ctr = caufvd_imp-prctr.
set parameter id: 'KOS' field caufvd_imp-kostv. Here iam passing the parameter id for getting the cost center
APPEND wa_srules TO srules.
CLEAR:wa_srules,
wa_zcs_settle_rc.
endloop.
CALL FUNCTION 'K_ORDER_SRULE_ADD'
EXPORTING
object_no = caufvd_imp-objnr
* IMPORTING
* FLG_RULE_INSERTED =
TABLES
srules = srules " here ita will get all data
criteria = ls_copadata
Thank you
04-09-2010 9:15 AM
hi,
you really dont need the colon ':' when you are passing only one parameter id, anyways.
also you are not calling any transaction after setting the parameter id, why are you setting it then?
its used to pass values to the next called transaction.
regards,
anoop
04-09-2010 10:04 AM
Hi,
You did it inside the loop. So when caufvd_imp-kostv will take the last one only.
Anyways I don't thing this statement is required in your case. Generally it required when you trying to passed the value in the next screen. or you used GET PARAMETER ID statement for same field.
Thanks.
Subhankar
04-09-2010 10:12 AM
Hi,
"Set parameter id" is used only when you call a transaction by passing the value to the parameter.
Eg
set parameter id: 'AUN' field wa_final-vbeln.
call transaction 'VA03' and skip first screen .
Regards
Vinod
04-09-2010 10:15 AM
Hi,
Ok..thank you for valuable information..
plz let me know... how to pass set parameter id.. i didnt use set/get parameters ..so abit confussion.
i want show the cost center value in iw32...in sender receiver screen
CALL FUNCTION 'K_ORDER_SRULE_ADD' "this f.m settelment rules adds to iw32 t.code..
EXPORTING
object_no = caufvd_imp-objnr
IMPORTING
FLG_RULE_INSERTED =
TABLES
srules = srules
criteria = ls_copadata
"before with out setparamter id, i was passing the cost center to Srules itab.. here cost center
getting but from the FM, its not passing to iw32 t.code.. if i use set/get parameter after FM.. is it valid or not
set parameter id: 'KOS' field caufvd_imp-kostv.
get parameter id: 'KOS' field caufvd_imp-kostv.
If i passed after f.m set/get is it ok?
Regards
04-09-2010 9:16 AM
Hi Balaji,
If you are asking about the syntax your statemant is correct.
Could you please debug it so that you will get some idea where is the issue.
Did you write it at any event?
I mean like start-of-selction........?
Regards,
Pravin
04-09-2010 9:55 AM
No i didnt write any events. its user exit..iam creating the settelment rules for iw32..
everty thing is perfect except the cost center.. with out set parameter id, before i did like
wa_srules-costcenter = caufvd_imp-kostv.
append wa_srules to srules.
so here costcenter appending to the itab. and passing the itab to functionmodule
as below shows as. but from here iam pulling the all values except the cost center value..
CALL FUNCTION 'K_ORDER_SRULE_ADD'
EXPORTING
object_no = caufvd_imp-objnr
* IMPORTING
* FLG_RULE_INSERTED =
TABLES
srules = srules
criteria = ls_copadata
if i pass the set parameter id . is it work it out?
any other way to kick off this prob? plz let me know..
thank you
Regards
04-09-2010 10:49 AM
There is nothing wrong in the statement :
set parameter id 'KOS' field caufvd_imp-kostv.
But to get get value at the desired location you also have to write :
get parameter id 'KOS' field caufvd_imp-kostv.
Hope this solves your problem.
04-09-2010 10:55 AM
hi,
thank you sanju.. for reply.
if i passed as below as. iam gettin sys error.. one which is cant chage the caufvd_imp value.
set parameter id: 'KOS' field caufvd_imp-kostv.
get parameter id: 'KOS' field caufvd_imp-kostv.
04-09-2010 12:11 PM
get parameter id 'KOS' field caufvd_imp-kostv.
The above statement is to be written where you want to retrieve the data which is being sent by the parameter id 'KOS'.
It should not be there just after
set parameter id 'KOS' field caufvd_imp-kostv.
set parameter id is used to send a single data from one SAP application to another... say from alv to smartform.....
here u give the set parameter id in the alv program and get parameter id in the driver program of smartform... to send across the required data....