Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

parameter id in cs03

Former Member
0 Kudos

hi everyone again!

i am having the same problem in CS03.

i need to transfer change number and clear the field valid from.

the type of the change number is char12.

everything works o.k accept from the aennr

and the field valid from which i didn't use set parameter id.

the code is:

set parameter id 'MAT' FIELD MATNR

set parameter id 'WRK' FIELD WERKS

set parameter id 'CSV' FIELD STLAN

set parameter id 'AEN' FIELD AENNR

call transaction 'CS03'.

regards

yifat

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi!

thank you very much for your answer.

it works perfectly fine.

but how did you know what fields to use in the export parameter?

regards

yifat

6 REPLIES 6

Former Member
0 Kudos

Hi Yifat

You can transfer no data to field VALID FROM using CALL TRANSACTION, because this field doesn't use a SET/GET parameter.

You colud try to use a field-exit.

Max

Former Member
0 Kudos

hi!

how do i transfer blank field without the set/get option?

also i am having problem with the change number, i cant transfer it

regards

yifat

Former Member
0 Kudos

Hi Yifat,

Check the following logic, it works for me..

REPORT zsritest.

DATA: l_stlal TYPE stko-stlal.

PARAMETERS: p_matnr LIKE rc29n-matnr OBLIGATORY,

p_werks LIKE rc29n-werks,

p_stlan LIKE rc29n-stlan,

p_aennr LIKE rc29n-aennr,

p_datuv LIKE rc29n-datuv DEFAULT sy-datum.

SET PARAMETER ID 'MAT' FIELD p_matnr.

SET PARAMETER ID 'WRK' FIELD p_werks.

SET PARAMETER ID 'CSV' FIELD p_stlan.

****The following EXPORT statement needed for AENNR..

EXPORT cad_rfc_flag = 'X' TO MEMORY ID 'CAD_RFC1'.

SET PARAMETER ID 'AEN' FIELD p_aennr.

****Now to set From Date

EXPORT com_datuv = p_datuv "From Date

com_stlal = l_stlal "Alt. BOM, here it is empty

TO memory ID 'WF'.

****Finally call transaction

CALL TRANSACTION 'CS03'.

Hope this helps..

Sri

0 Kudos

Hi Yifat

You're a lucky boy, Sri is right.

In the routine transaktion_init_01 there's this piec of code:

import com_datuv com_stlal from memory id 'WF'.

So you can use the parameter WF to transfer the date to field valid from.

There is just only a little problem:

Afetr calling the routine transaktion_init_01 the std run the routine DATE_INIT_DATUV:

FORM DATE_INIT_DATUV.

CHECK RC29N-DATUV IS INITIAL.

IF TSD-TRTYP EQ ANLEGEN.

IF TCS03-LOWDT IS INITIAL.

RC29N-DATUV = SY-DATUM.

ELSE.

RC29N-DATUV = MIN_GRG.

ENDIF.

ELSE.

IF TCS03-LOWDT IS INITIAL.

RC29N-DATUV = SY-DATUM.

ELSE.

RC29N-DATUV = MIN_GRG.

ENDIF.

ENDIF.

ENDFORM.

So you can't transfer a blank date, becouse the system fill it with SY-DATUM, but you could use a date like '19000101' or '00010101'.

DATA: com_datuv LIKE SY-DATUM VALUE '19000101'.

set parameter id 'MAT' FIELD MATNR.

set parameter id 'WRK' FIELD WERKS.

set parameter id 'CSV' FIELD STLAN.

set parameter id 'AEN' FIELD AENNR.

export com_datuv to memory id 'WF'.

call transaction 'CS03'.

Max

Message was edited by: max bianchi

Former Member
0 Kudos

hi!

thank you very much for your answer.

it works perfectly fine.

but how did you know what fields to use in the export parameter?

regards

yifat

0 Kudos

Hi Yifat

You can know them only seeing the code of program.

Infact the std programs often use the set/get or import/export for internal uses: you can try to take advantage of that.

So after getting out the set/get parameters of input fields it should be better to check if some fields you need is filled by import/export or other set/get parameters.

In your case if you see the logic flow of scree 100 of SAPLCSDI:

module transaktion_init --> FORM TRANSAKTION_INIT_01

In this form you can find this piece of code:

data : com_datuv like sy-datum, com_stlal like stko-stlal.

import com_datuv com_stlal from memory id 'WF'.

if sy-subrc eq 0.

rc29n-datuv = com_datuv.

rc29n-stlal = com_stlal.

endif.

So here you can get out which fields to use in the export.

Max