cancel
Showing results for 
Search instead for 
Did you mean: 

How to get data from custom nodes in standard web dynpro components and save the same in standard tables

0 Kudos

Hello friends,

I have created custom nodes by enhancing standard web dynpro components. The attributes are bound to custom input fields tax office & tax numbers.

I want to save the data input by the user in DB tables. I could have enhanced the standard structure used in the standard node but that inturn would affect lot of tables, structures etc.

Please suggest any work arounds for this.

Thanks in advance!!!

Regards,

Anish

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member222068
Active Participant
0 Kudos

Hi Anish,

If you are enhancing standard structures, ensure where all the structures are used. else you may get error Type not compatible.

Thanks & Regards,

Sankar Gelivi. 

former_member184578
Active Contributor
0 Kudos

Hi,

Could you let know, what is stopping you from reading the custom attributes from context?

Regards,

Kiran

0 Kudos


Hi Kiran,

I can read the attributes localy in the methods inside the component but I have to pass them to the BAPI or some method triggered to save the data. When I debugged I could not find out which structure has the custom attribute values in run time.

I am missing something. Could you tell me how can I get the values in run time.

Thank you,

Anish

ramakrishnappa
Active Contributor
0 Kudos

Hi Anish,

As you have created custom nodes to hold the data of custom fields. You need to read the custom nodes and pass to the bapi or method.

Example:

          you have created a node NODE_1 of type structure ZST_TAX_INFO

          Now, create a table type ztt_tax_info of zst_tax_info structure

          Create a parameter in method IT_TAX_INFO of type ztt_tax_info

         

     Now, in WD

          Read the data of context node_1 as below

          data:               lt_tax_info type ztt_tax_info.

              

               lo_node = wd_context->get_child( wd_this->wdctx_node_1 ).

               lo_node->get_static_attributes_table( importing table = lt_tax_info )

          call method wd_assist->save_data(

                         exporting

                             

                              it_tax_info = lt_tax_info )

Hope this helps you.

Regards,

Rama

0 Kudos

Hi Rama,

Thanks for the tip.

When I debugged I got to know that the class /SAPSRM/CL_PDO_BP_UPDATE_BUFF gets triggered which handles all the data the user enters on the screen if the attributes are part of standard structures.

I need the data from the custom context attributes in the buffer when that class triggers.

Please tell me how to get the data into buffer.

This is a standard process for registration of suppliers in SRM. Sorry for not mentioning these details earlier.

Thank you,

Anish