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: 

Auto updating of Domain Values(Value ranges)

Former Member
0 Kudos

Dear all,

Please give me solution for ,I have to auto update Domain level values in production system.

Means : I ll give the example

I maintained some values at domain level and create request moved to prodution.

But user wants he will update some values in production.

Because these values should validate at transaction level example FB01 extra....

For this please give solution.

Regards,

6 REPLIES 6

Sandeep_Kumar
Advisor
Advisor
0 Kudos

You can create a value table and maintenance view for the same so that the user can directly maintain this view.

0 Kudos

Thanks for giving reply.

Can you give detailed solution.

Regards,

Praveen

0 Kudos

This message was moderated.

0 Kudos

hai Arul,

My requirement is domain level entries...

Example i have changed one standard sap domain for field 'KIDNO' and entered some values at domain level.

example I have entered F1,F2,F3 ext....at domain level.these 3 values only will be accepted at screen level.

Example. I am creating on FI entry because KIDNO is used here .So I have to select one of them from what i have mentioned above F1,F2,F3. But user wants to add one more value say F4...and it is also be accepted at screen level.

So user wants keep on adding once in week or as for his requirement. That's why we have to do auto update the values at domain level only.

Regards,

Former Member
0 Kudos

Hi Praveen ,

Try with below function Modules. It will work. you need to decide what kind of method you are going to adopt ( Custom program or someother implementation ).

 DATA : versno TYPE versno,     domain_name  TYPE versobjnam VALUE 'ZTEST_DOM',
       dom_name TYPE domname VALUE 'ZTEST_DOM'.  " For Testing purpose , I Created Domain ZTEST_DOM

DATA : dd01v_tab TYPE STANDARD TABLE OF dd01v WITH HEADER LINE,
        dd07v_tab TYPE STANDARD TABLE OF dd07v WITH HEADER LINE,
        dd01tv_tab TYPE STANDARD TABLE OF dd01tv WITH HEADER LINE,
        dd07tv_tab TYPE STANDARD TABLE OF dd07tv WITH HEADER LINE.

  versno = 00000.
"  for a given Domain Value get the Details
CALL FUNCTION 'SVRS_GET_VERSION_DOMD_40'
  EXPORTING
    object_name = domain_name
    versno      = versno
  TABLES
    dd01v_tab   = dd01v_tab
    dd07v_tab   = dd07v_tab
    dd01tv_tab  = dd01tv_tab
    dd07tv_tab  = dd07tv_tab
  EXCEPTIONS
    no_version  = 01.
READ TABLE dd01v_tab INDEX 1.
SORT dd07v_tab BY valpos.

" In DD07V_TAB , you need to Insert your new domain value in the next Value position ( Its in a Seqnuence )
"The below FM will update Domain values
CALL FUNCTION 'DD_DOMA_PUT'
  EXPORTING
    dd01v_wa            = dd01v_tab
    domain_name         = dom_name
    prid                = 0
    ctrl_doma_put       = 'A'
  TABLES
    dd07v_tab           = dd07v_tab
  EXCEPTIONS
    illegal_value       = 1
    op_failure          = 2
    object_inconsistent = 3
    OTHERS              = 4.
IF sy-subrc IS INITIAL.
*  CALL FUNCTION 'DB_COMMIT' .
ENDIF.
  

Edited by: Prasath Arivazhagan on May 19, 2010 4:43 PM

Edited by: Prasath Arivazhagan on May 20, 2010 9:49 AM

Former Member
0 Kudos

Do you mean Fixed Values on a Domain? If so, you have to enter new values via SE11 in your development system and transport the changes.

Is your Domain a custom Z one? Is so, you need to change the domain definition to be based on a value table. You can then decide on whether that value table is to be maintained via Config and transported up, or develop a maintenance dialog.