cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form -Interactive -Subform dissappear after Click

Former Member
0 Kudos

Hi.

I have a Interactive form with a Native submit button with single MAIN view .

I am poupulating the form intially in WDOINIT method & I am trying to do some calculations on the form using submit click.

Here is what i am doing onclick.After I click submit button item form dissappears completely .

When I debug i see all the entries in the table lt_material but it doesn't shows up in the form.

I don't have anycode in other Methods.What could be the reason? I can use scripts too but I need to use this functionality for other requirement.

METHOD onactionclick .
 
  DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
  DATA lo_nd_material_node TYPE REF TO if_wd_context_node.
  DATA lo_el_material_node TYPE REF TO if_wd_context_element.
  DATA ls_material_node TYPE wd_this->element_material_node.
 
  DATA lt_material TYPE STANDARD TABLE OF wd_this->element_material_node.
  DATA wa_material TYPE wd_this->element_material_node.
 
 
* navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
  lo_nd_adobe_data = wd_context->get_child_node( name = wd_this->wdctx_adobe_data ).
 
* navigate from <ADOBE_DATA> to <MATERIAL_NODE> via lead selection
  lo_nd_material_node = lo_nd_adobe_data->get_child_node( name = wd_this->wdctx_material_node ).
 
  IF lo_nd_material_node IS NOT INITIAL.
    CALL METHOD lo_nd_material_node->get_static_attributes_table
      IMPORTING
        table = lt_material.
 
  ENDIF.
 
  LOOP AT lt_material INTO wa_material.
 
 
    wa_material-diffq = wa_material-sysqn -  ( wa_material-usrmo + wa_material-relw1 + wa_material-relw2 + wa_material-relw3 ).
 
    MODIFY lt_material FROM wa_material.
 
  ENDLOOP.
 
 
  lo_nd_material_node->bind_table( lt_material ).
 
 
ENDMETHOD.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As per understanding from your question, initially you are displaying some entries in adobe form and based on some values in the fields, you have to calculate the value of another field. Let me correct if am wrong.

If that is the case, then you do it the calculation in JAVASCRIPT or FORMCALC on click event.

Thanks.

Former Member
0 Kudos

Diwakar ,

You are right i can do calculations via script but what I need is a button too.. because I need to use this pdfsource and store it in colloboration folder.

When I just use a button a with no coding in it and I click the button my subform Item details dissappears .

Rgds

Vara

chintan_virani
Active Contributor
0 Kudos

Vara,

If you are using the Submit button from Web Dynpro Native Library then its onSubmit event handler is invoked on WD side and not the click event. So put the code in onSubmit event instead of onClick.

Chintan

Former Member
0 Kudos

Chintan,

I am using Onsubmit event which is the only avaialble option on form properties.

I just named event as CLICK but I changed it now to submit but it is still doing the same .

Itemform is dissappearing on click.

Control type for native button is regular. code inside this button is .

// DO NOT MODIFY THE CODE BEYOND THIS POINT - 800.20070410093956.383622.376748 - SubmitToSAP.xfo
                      ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
                      // END OF DO NOT MODIFY

All I am doing is retrieving the context data and doing some modifications and re-binding.

FYI.. I am moving from WD1 (ALV with buttons ) to WD2 (pops up adobe form in new window intiaily) by transferring cookies . I need that button in WD2 .

Do you think that cookies is causing this problem? because after click i don't need that context data anymore.All i need is form data which I get through

IF lo_nd_material_node IS NOT INITIAL.
    CALL METHOD lo_nd_material_node->get_static_attributes_table
      IMPORTING
        table = lt_material.

  ENDIF.

and re-binding

lo_nd_material_node->bind_table( lt_material ).

Rgds

Vara

Edited by: Vara K on Aug 13, 2009 5:22 PM

Edited by: Vara K on Aug 13, 2009 6:28 PM

Former Member
0 Kudos

Resolved myself.

It was binding issue in form.

rgds

Vara

Answers (0)