Skip to Content
avatar image
Former Member

Problem in Set parameter ID

Dear Abapers,

I have developed an ALV report where when double click on a

Process Order number the report will call a standard TRANSACTION

COR3 using call transaction method. I have use the following

attached code to do the same. But the report always takes the

first selected Process Order value in the cor3 transaction.

Whenever i click on any other process Order number it always take

the first click value.

But i have checked that the parameter ID field is taking the

correct value.. But in the program it is not taking, it only

takes the first clicked value from the alv report.

FORM user_cor3 USING u_ucomm LIKE sy-ucomm

us_selfield TYPE slis_selfield.

IF us_selfield-fieldname = 'AUFNR'.

DATA: i_aufnr LIKE AFKO-aufnr.

READ TABLE i_final INDEX us_selfield-tabindex.

IF SY-SUBRC = 0.

i_aufnr = i_final-aufnr.

CASE u_ucomm.

WHEN '&IC1'.

SET PARAMETER ID 'ANR' FIELD i_aufnr .

CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN .

ENDCASE.

ENDIF.

ENDIF.

ENDFORM.

"USER_COR3

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Sep 05, 2009 at 02:02 PM

    Hi THILAGARAJ,

    please check in debugger if i_aufnr hast the correct value before

    SET PARAMETER ID 'ANR' FIELD i_aufnr .

    .

    Also make sure that PARAMETER ID 'ANR' is used in transaction COR3 to set the value.

    To check this, analyse start screen 5110 . Here you can see that

    GET PARAMETER ID 'BR1'

    is used to initialize field CAUFVD-AUFNR.

    And if you post any code, please use the above <_> code marker and see the preview before posting, thanks.

    Kind regards,

    Clemens

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 05, 2009 at 10:56 AM

    TYPE-POOLS : slis.

    DATA : fcat TYPE slis_t_fieldcat_alv.

    DATA : it_sflight TYPE TABLE OF sflight WITH HEADER LINE.

    SELECT * FROM sflight INTO TABLE it_sflight.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = sy-repid

    i_callback_user_command = 'USER_COMMAND'

    i_structure_name = 'SFLIGHT'

    TABLES

    t_outtab = it_sflight

    FORM user_command USING u_ucomm LIKE sy-ucomm

    us_selfield TYPE slis_selfield.

    IF US-ucomm = '&IC1'.

    READ TABLE it_sflight INDEX us_selfield-tabindex.

    Here try to clear the i_aufnr and try------>

    IF sy-subrc IS INITIAL.

    WRITE : it_sflight-carrid.

    SET PARAMETER ID 'CAR' FIELD IT_SFLIGHT-CARRID.

    DATA : CAR TYPE SPFLI-CARRID.

    GET PARAMETER ID 'CAR' FIELD CAR.

    ENDIF.

    ENDIF.

    ENDFORM. "user_COMMAND

    Check the above program is working fine with your logic.

    Check which internal table you are using is it same as i_final in the FM

    Cheers

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 05, 2009 at 11:04 AM

    Hi,

    Try like below:

    IF us_selfield-fieldname = 'AUFNR'.
    i_aufnr = us_SELFIELD-VALUE.
    CASE u_ucomm.
    WHEN '&IC1'.
    SET PARAMETER ID 'ANR' FIELD i_aufnr .
    
    CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN .
    ENDCASE.
    endif.
    

    Regards,

    Himanshu

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 05, 2009 at 01:20 PM

    Im notsure abou this ...

    Just check

    FREE MEMORY ID 'ANR' .

    SET PARAMETER ID 'ANR' FIELD i_aufnr .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2009 at 01:13 PM

    Hello

    You can refer to the following links to know all about SET/GET parameters.

    [Using SET/GET Parameter ID in SAP|http://www.how2sap.com/blog/sap-abap/using-setandget-parameter-id-in-sap/]

    [Associating SET/GET Parameters to Screen elements|http://www.how2sap.com/blog/sap-abap/associating-setget-parameters-to-screen-elements/]

    [Persisting SET/GET Parameter values|http://www.how2sap.com/blog/sap-abap/persisting-setget-parameter-values-in-user-profile/]

    Happy Reading,

    Anand.

    [How2SAP.com|http://www.how2sap.com/blog/]

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 22, 2009 at 12:20 PM

    Below statement is used to resolved the problem.

    SET PARAMETER ID 'BR1' FIELD G_T_GT_OUTTAB-AUFNR.

    GET PARAMETER ID 'BR1' FIELD G_BR1.

    CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

    Add comment
    10|10000 characters needed characters exceeded