cancel
Showing results for 
Search instead for 
Did you mean: 

How to access another submit button event in web dynpro ABAP for forms

Former Member
0 Kudos

HI experts,

I'm having 2 views in web dynpro.. From first view, im navigating to second view which contains interactive form(Adobe)..

In tat interactive form i already placed a submit button ( ie from web dynpro native )and did some operations.. from tat PDF or form

i need to go back to the first view..

So i need to create another button.. Whether i need to create another submit button and if i created also,

hw could i access tat button in web dynpro (b'z i did it, im getting only one event in interactive form like "Onsubmit" which is already present)..

Can anyone help me out..

Thanks in advance..

Edited by: RameshKumar on Nov 10, 2009 12:44 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ramesh

Try this one...

First add a attribute say, status in ur context.

In ur form keep two buttons.. BACK and SUBMIT..

in the BACK button's javascript code add the following,


status.rawValue = "BACK";

in SUBMIT button's javascript code,


status.rawValue = "SUBMIT";

then, in ur onactionsubmit, add the following with ur code


* get single attribute
  lo_el_main->get_attribute(
    exporting
      name =  `STATUS`
    importing
      value = lv_status ).
 
 
if lv_status = 'BACK'.

"write your code.
 
elseif lv_status = 'SUBMIT'.
 
"write your code
 
endif.

Regards,

Surya

Edited by: Surya PK on Nov 10, 2009 4:35 PM

Former Member
0 Kudos

hi

thanks for ur reply..

I tried wat u said.. but in Script hw this statement is accepted?..

status.rawValue = "SUBMIT";

( after "status" wen im putting dot , the rawValue must be shown automatically know.. but i couldnt see tat one)

ie., im not getting the value in 'lv_status' wen i debug the "Onsubmit" method..

Former Member
0 Kudos

Hi

Try this.


xfa.form.data.<Page>.<Field>.rawValue = "SUBMIT"; 

Kind Regards

Mukesh

Former Member
0 Kudos

hi mukesh,

i was trying from morning onwards.. but an run time error like "Incorrect Hexadecimal Number "..

ie after including the statement

xfa.form.USERDET.Userdet.STATUS.rawValue = "BACK"; ( USERDET->Userdet->status is my flow )

If i comment tat statement, it s working as usual..

Edited by: RameshKumar on Nov 11, 2009 1:04 PM

Former Member
0 Kudos

Hi

Check the following things..

Status is the attribute created in WD ABAP with type string.

Did you bind that attribute with form fields (for testing bind the attribute with text field and check the value change at runtime)


USERDET.Userdet.STATUS.rawValue = "BACK";

Kind Regards,

Mukesh

Former Member
0 Kudos

thanks mukesh..

i got the ouput..

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Create one context attribute and change the value during button click in the PDF using script , For eg if back button clicked set the attribute value as "back" and validate the attribute value in the action "Onsubmit" and do the operation.

Kind Regards,

Mukesh