‎2007 Jan 30 7:18 AM
Hallo experts,
Please look at the below code..
SET PARAMETER ID 'MAT' FIELD t_tab-matnr. "material number
SET PARAMETER ID 'WRK' FIELD t_tab-werks. "plant
SET PARAMETER ID 'PTY' FIELD t_tab-plnty. "plan type
SET PARAMETER ID 'PLN' FIELD t_tab-plnnr. "plan group
SET PARAMETER ID 'PAL' FIELD t_tab-plnal. "group counter
SET PARAMETER ID 'STT' FIELD t_tab-datuv. "valid from date
CALL TRANSACTION 'CA98' .
My requirement is to give the values to the fields (Material number, Plant, TL type, Group, Group counter..) from a row of an internal table, and call the transaction so that the transaction will be called with the values filled in respective fields.
The problem what I'm facing is.. eventhough I set the paramenter IDs, only Material number, Group, TLtype are getting flled and others are not.
Please help me in resolving this issue. What could be the possible reasons for this.
I'm sure will assign U the points.
Thanks in advance.
‎2007 Jan 30 7:56 AM
Hi Matt,
For plant use ID as 'WER' and not 'WRK'
and for Group Counter use ID 'PLA' and not 'PAL'
You can not set value for Valid from Date as its Data Element do not have any default Parameter ID.
P.S. Please reward if the answer is useful.
Susanth
‎2007 Jan 30 7:20 AM
Matt,
you code is correct, can u check the value of the others before
call transaction.
regds,
kiran
‎2007 Jan 30 7:20 AM
well are you sure the TA va98 gets all those filled values from SAP-memory?
i hence you have to look for a user-exit in ca98 and just read those values.
‎2007 Jan 30 7:21 AM
SET PARAMETER ID 'MAT' FIELD t_tab-matnr. "material number
SET PARAMETER ID 'WRK' FIELD t_tab-werks. "plant
SET PARAMETER ID 'PTY' FIELD t_tab-plnty. "plan type
SET PARAMETER ID 'PLN' FIELD t_tab-plnnr. "plan group
SET PARAMETER ID 'PAL' FIELD t_tab-plnal. "group counter
SET PARAMETER ID 'STT' FIELD t_tab-datuv. "valid from date
CALL TRANSACTION 'CA98' .
See this sample code
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
data: lv_werks LIKE v_mmim_lc-werks, "plant
lv_matnr LIKE v_mmim_lc-matnr, "Material
lv_lgort LIKE v_mmim_lc-lgort, "Storage Location
lv_charg LIKE v_mmim_lc-charg. "batch
read table i_output into w_output index rs_selfield-tabindex.
lv_matnr = w_output-matnr.
lv_werks = w_output-werks.
lv_lgort = w_output-lgort.
lv_charg = w_output-charg.
SET PARAMETER ID 'MAT' FIELD lv_matnr.
SET PARAMETER ID 'WRK' FIELD lv_werks.
SET PARAMETER ID 'LAG' FIELD lv_lgort.
SET PARAMETER ID 'CHA' FIELD lv_charg.
CALL TRANSACTION c_transaction_call AND SKIP FIRST SCREEN .
CLEAR w_output_copy-prueflos.
Clear: lv_matnr,
lv_werks,
lv_lgort,
lv_charg.
ENDFORM.Make sure the values are there in the t_tab.
Hope you are reading the chosen row from teh output.
‎2007 Jan 30 7:30 AM
Thanks for ur interest.
The internal table row is perfectly fine.. having values in it. I even checked in Dubugging mode.
When I call CA02, instead of CA98, it is working fine...with filled values on screen.
Only problem is with CA98. I dont know why ..
‎2007 Jan 30 7:37 AM
Hi,
Just try passing only the mandatory values for CA98.
Material Number and Plant are MANDT i hope.
Try this.
‎2007 Jan 30 7:47 AM
Hi Judith,
I tried it. But same result again.. Material is filling up but not Plant.
‎2007 Jan 30 7:53 AM
one hint is
1. goto table TPARA in SE11
2. search for plant and chekout the parameter ids available for that plant
3. try with them if it works out
4. similarly for other fields also
‎2007 Jan 30 7:22 AM
Hi,
Check your itab for remaining fields whether they are having values or not.
Thanks
Shiva
‎2007 Jan 30 7:24 AM
Matt,
Put a break point before statement CALL TRANSACTION and check if T_TAB table is having all the values mentioned here.....
Susanth
‎2007 Jan 30 7:56 AM
Hi Matt,
For plant use ID as 'WER' and not 'WRK'
and for Group Counter use ID 'PLA' and not 'PAL'
You can not set value for Valid from Date as its Data Element do not have any default Parameter ID.
P.S. Please reward if the answer is useful.
Susanth
‎2007 Jan 30 8:13 AM
Thanks a lot Sushanth.. U solved my problem.
Could U please tell me how did U find it ?
I awarded U points.
Thanks again.
Matt
‎2007 Jan 30 8:16 AM
Matt,
TC CA98 is an executable program. If you go and check the Selection fields in this program these fields have explicitly defined parameter Ids. I got those values from there....
Susanth.
‎2007 Jan 30 8:07 AM
MATT,
can u try this.
SET PARAMETER ID 'MAT' FIELD t_tab-matnr. "material number
<b>SET PARAMETER ID 'WER' FIELD t_tab-werks. "plant</b>
SET PARAMETER ID 'PTY' FIELD t_tab-plnty. "plan type
SET PARAMETER ID 'PLN' FIELD t_tab-plnnr. "plan group
<b>SET PARAMETER ID 'PLA' FIELD t_tab-plnal. "group counter</b>
SET PARAMETER ID 'STT' FIELD t_tab-datuv. "valid from date
this things you can check in the program RCPPPSEL, which
CA98 associated, In this program the memory id is different
regds,
kiran
‎2007 Jan 30 8:14 AM