Skip to Content
avatar image
Former Member

How to Pass selected drop down value to another transaction

Hi experts,

I have one requirement to generate auto number for CJ01 tcode.

Actually I have created One custom table to maintain the auto numbers for the corresponding profiles, here only 3 profiles. whenever we open CJ01 tcode the system should generate one autonumber for the corresponding profile form Ztable and increment by one and assign that value to Project definition .

Let me explain by expample.

I have 3 profiles.

1) AAA

2) BBB

3)CCC

initially in ZTable having these values

AAA --10001

AAA---10002

AAA---10003

When ever we we select AAA profile from CJ01 tcode the system should able to assign 10004 value to Project Def in the screen. after that when we save

the number should save in Ztable..that is my requirement..

how to solve it?

When we select the Project profile from drop down box , we should generate one auto number to Project definition.

I have to pass Project profile from the selection using list box . please see the below screen

Please see my sample code :

When i select some second or 3rd profile from drop down box its not setting to set parameter ?

Please suggest me how to resolve this problem..

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Sep 09, 2014 at 03:39 AM

    You can use FM 'NUMBER_GET_NEXT ' to get number range instead of custom table or get data from custom table and sort is by descending to get latest number and add 1 into number.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2014 at 03:46 AM

    Hi Srinath

    value-key = sy-tabix.

    CONDENCE value-key. " To add this code here.

    value-text = wa_data-profl.

    Then 'p_profl' will populated value when you 'SET PARAMETER ID'.

    regards,

    Archer

    Add comment
    10|10000 characters needed characters exceeded