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: 

user_command error

Former Member
0 Kudos

Hi,

I have defined the following User_Command

CASE RS_SELFIELD-FIELDNAME.
    WHEN 'VBELN'.
      SET PARAMETER ID 'VF' FIELD RS_SELFIELD-VALUE.
      CALL TRANSACTION 'VF03'  AND SKIP FIRST SCREEN.
    WHEN 'VBELN_GRP' or  'VBELV'.
      SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.
      CALL TRANSACTION 'VA43'  AND SKIP FIRST SCREEN.
*    WHEN 'VBELV'.
*      SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.
*      CALL TRANSACTION 'VA43'  AND SKIP FIRST SCREEN.
  ENDCASE.

when the field id VBELN,the call transaction is working fine.

in either case where VBELN_GRP / VBELV are the fields,the call transaction is not working.I have checked for the parameter ID.The error being the first screen of VA43 being displayed,or the OLD contract previously opened in different session is getting displayed.

please suggest changes to rectify this error.

Thanks.

28 REPLIES 28

kesavadas_thekkillath
Active Contributor
0 Kudos

try this,

FREE MEMORY ID 'VF'.

FREE MEMORY ID 'AUN'.

CASE RS_SELFIELD-FIELDNAME.

WHEN 'VBELN'.

SET PARAMETER ID 'VF' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

WHEN 'VBELN_GRP' or 'VBELV'.

SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.

  • WHEN 'VBELV'.

  • SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.

  • CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.

ENDCASE.

0 Kudos

Thanks Keshav for the prompt reply.

FREE MEMORY ID 'VF'.
FREE MEMORY ID 'AUN'.

Even the above statements are not working.

Former Member
0 Kudos

hi

Try to clear the variable(RS_SELFIELD-FIELDNAME).not sure

Former Member
0 Kudos

hi,

VBELN_GRP -


> must be of type VBELN

VBELV -


> must be of type VBELN

otherwise your statement are OK

I have checked it on my side it is perfect.

set a break-point before the set parameter id statement and check whether the value is correct in the FIELD RS_SELFIELD-VALUE.

Regareds,

Abhijit G. Borkar

0 Kudos

Hi Abhijit,

Thanks for the reply.

The following fields are storing the correct value as per the ALV field we Click.

RS_SELFIELD-VALUE & RS_SELFIELD-FIELDNAME

When CALL TRANSACTION command is executed,it points to a different field.

Please advice.

0 Kudos

hi,

just do one small test remove the skip screen statement and see if it is taking you to the transaction code: VA43 and the desired value is getting populated via the parameter id...

Just do this and let me know....

Regards,

Abhijit G. Borkar

0 Kudos

Hi Abhijit,

the value in the following fields are as per the ALV grid:

RS_SELFIELD-VALUE  
RS_SELFIELD-FIELDNAME

but when the transaction comes,it has a different field value.If its 140 in ALV grid,then 160 is getting displayed.

Even removing the

SKIP FIRST SCREEN

does bring us to the initial screen,but the contract number is again an error.

Thanks.

kesavadas_thekkillath
Active Contributor
0 Kudos

Use the BDC Method like.

call transaction 'VA01' with bdcdata.

0 Kudos

Hi Keshav,

CALL TRANSACTION 'VA43' USING BDCDATA_TAB.

is not working.it goes to the initial screen of VA43,with the wrong value of contract.

please suggest.

venkat_o
Active Contributor
0 Kudos

Hi, <li>There should be corresponding GET PARAMETER ID 'AUN' FIELD xyz for the SET PARAMETER ID mentioned before you use CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN statement. <li> SAPMV45A is the program for VA43 transaction code. I searche with the term GET PARAMETER ID 'AUN' in that program. It was not found. So conclusion is, AND SKIP FIRST SCREEN is used when you have corresponding GET PARAMETER ID in the program of the transaction. Thanks Venkat.O

Former Member
0 Kudos

HI Venkat,

Thanks for the reply.

As you must have followed the question,its working fine for VF03 tcode.But for VA43 its giving error.

Please suggest.

0 Kudos

Please read the reason suggested by Venkat.

Former Member
0 Kudos

Hi Venkat,

OK I have changed the code by leaving the following statement:

AND SKIP FIRST SCREEN.

Now the double click takes us to the initial screen of VA43,but the value of the field is not populated.

Please advice.

Former Member
0 Kudos

Hi Venkat,

OK I have changed the code by leaving the following statement:

AND SKIP FIRST SCREEN.

Now the double click takes us to the initial screen of VA43,but the value of the field is not populated.

Please advice.

Former Member
0 Kudos

hi

try this one VA43 field name shold be 'VBELN' .Please cehck the value(VBELN).

Edited by: dharma raj on Jan 20, 2010 11:35 AM

Former Member
0 Kudos

Hi Dharma,

That too is giving error,because the field name in ALV needs to be checked.

Thanks.

Former Member
0 Kudos

hi

for this it is working fine.

SET PARAMETER ID 'AUN' FIELD '40000231'.

CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.

so please hard code the value and cehk the vaule or while debuggin the correct value is passing or not check it .

In ALV u r passing the VA43(contract no)? .

what error u r getting?

Former Member
0 Kudos

Hi Dharam,

The following code change is still not giving the result.

SET PARAMETER ID 'AUN' FIELD '161'.
      CALL TRANSACTION 'VA43'AND SKIP FIRST SCREEN.

It goes to initial screen of VA43 but there is an error,

"Enter the Document Number"

Thanks.

Former Member
0 Kudos

hi

Have u tried this?

free memory id 'AUN'.

SET PARAMETER ID 'AUN' FIELD '161'.

CALL TRANSACTION 'VA43'AND SKIP FIRST SCREEN.

Former Member
0 Kudos

Hi Dharam,

The following code change is still not giving the result.

SET PARAMETER ID 'AUN' FIELD '161'.
      CALL TRANSACTION 'VA43'AND SKIP FIRST SCREEN.

It goes to initial screen of VA43 but there is an error,

"Enter the Document Number"

Thanks.

Former Member
0 Kudos

hi

Try this but am not sure

Goto VA43 entrr the contract no 161 and come back.after excute the pgm.

Former Member
0 Kudos

Should I code the sequence as GOTO instead of CALL TANSACTION?

Former Member
0 Kudos

Thanks for all the inputs,but this is still not solved.

Closing the thread.

Former Member
0 Kudos

Hi,

I have the solution the parameter ID is "KTN", it's written when use F1 in the field "VBAK-VBELN" on firstscreen.

0 Kudos

Hi

Did u get any solution?

I am also facing the similar problem.

Please advise if you got the solution.

Thanks & Regards

Gopal

Former Member
0 Kudos

hi,

put a break-point before you case statement and check the values in RS_SELEFIELD

if they are correct then in the case statement do this...

CASE RS_SELFIELD-FIELDNAME.

WHEN 'VBELN'.

SET PARAMETER ID 'VF' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

WHEN 'VBELN_GRP' or 'VBELV'.

FREE MEMORY ID 'AUN'. -


> Check if this solves it for you

SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.

CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.

ENDCASE.

Hope it helps you,

Regards,

Abhijit G. Borkar

0 Kudos

HI Abhijit,

FREE MEMORY ID

is not helping solve the problem.

Former Member
0 Kudos

any suggestions...I am still looking for the answer.