Application Development and Automation 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: 
Read only

CUCB_GET_CONFIGURATION

Former Member
0 Likes
2,948

I'm trying to use the function module CUCB_GET_CONFIGURATION, but I'm a little confused as to what to use for the import parameters, and I can't seem to find documentation on it... could anyone explain?

Background: I'm doing a user exit for when the user presses Save for Orders, in VA01 and VA02, using Z_MV45A_SAVE_DOCUMENT_PREPARE. I would like to use the characteristic values in variant configuration (Extras -> Configuration)... so that's what I'm getting at.

Original thread:

Thanks!

Madeline

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,085

It appears that we use this function module in most of our programs. Works pretty good.



 data: i_char type table of comw with header line.
 

* Retrieve Characteristics.
  call function 'CUD0_GET_VAL_FROM_INSTANCE'
       exporting
            instance           = vbap-cuobj
       tables
            attributes         = i_char
       exceptions
            instance_not_found = 1.


Regards,

Rich Heilman

I'm trying to use the function module CUCB_GET_CONFIGURATION, but I'm a little confused as to what to use for the import parameters, and I can't seem to find documentation on it... could anyone explain?

Background: I'm doing a user exit for when the user presses Save for Orders, in VA01 and VA02, using Z_MV45A_SAVE_DOCUMENT_PREPARE. I would like to use the characteristic values in variant configuration (Extras -> Configuration)... so that's what I'm getting at.

Original thread:

Thanks!

Madeline

3 REPLIES 3
Read only

Former Member
0 Likes
2,085

Hi Madeline,

Why don't you use FM VC_I_GET_CONFIGURATION instead?

Please check this sample codes.

...

select single * from vbap where vbeln = p_vbeln  
                            and posnr = p_posnr.

if sy-subrc = 0.
  l_instance = vbap-cuobj.
endif.

call function 'VC_I_GET_CONFIGURATION'
  exporting
      instance            = l_instance
   tables
      configuration       = i_configuration
   exceptions
      instance_not_found  = 1
      internal_error      = 2
      no_class_allocation = 3
      instance_not_valid  = 4
      others              = 5.

loop at i_configuration.
  ....
endloop.

...

Hope this will help.

Regards,

Ferry Lianto

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,085

I believe that all you need to pass is the CUOBJ number which is found in VBAP.

Regards,

Rich Heilman

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,086

It appears that we use this function module in most of our programs. Works pretty good.



 data: i_char type table of comw with header line.
 

* Retrieve Characteristics.
  call function 'CUD0_GET_VAL_FROM_INSTANCE'
       exporting
            instance           = vbap-cuobj
       tables
            attributes         = i_char
       exceptions
            instance_not_found = 1.


Regards,

Rich Heilman