on 04-13-2007 1:48 PM
Hello All,
I am developing ISR Forms in ECC 6.0 Sys.
1. I have created ISR SCenario in Transaction QISRSCENARIO. with form attched
to it.
2. Then I have created one Button in the form & write following script at the click
event of button. "xfa.record.CONTROL_PARAM.ISR_EVENT.value = "CHECK";
3. Then I have Implemented BADI for this scenario
"·SCENARIO_PROCESS_USER_COMMAND " & written some code.
4. Now ISR_EVENT is getting value CHECK as event but BADI method is not getting triggered ,Pls help me to find the reson Why after clicking on button script is called but not BADI is getting triggered.
Pls help.
Smita
Answered !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smita,
Well, I think your process(idea) looks fine, except you should use a normal BUTTON. As Anthony suggested, why dont you refer the related NOTES to get an idea of ISR Control Library.
Betn us, make sure that your BADI's implementation is ACTIVATED, usually, we make this mistake in hurry.(This point may sound silly, but,something quiet comman mistake that we make around)
Let us know if you still get some problems.
Regards
<i><b>Raja Sekhar</b></i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guyes,
With all ur suggesiones I have done Following...
1. Button from ISRControl 2005 Native Library with script
-
data.#subform[0].ISR_FormEventButton::mouseDown - (FormCalc, client) -
//Set ISR_EVENT for BAdI processing in backend
<b>$record.CONTROL_PARAM.ISR_EVENT = "DISP"</b>
-
data.#subform[0].ISR_FormEventButton::click - (JavaScript, client) -
//Trigger call to backend for BAdI user command processing
<b>app.eval("event.target.SAPSubmit();");
ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");</b>
2. BADI already written as mentioned above.
ISR_EVENT standard field getting value of event "DISP" properly means Mosedown event working fine.
But the problem is When I set External Break Point on the BADI for User Command the control is not going there.
Means My BADI Method is not getting Triggered.....I dont know why?????
What are the possibilities of BADI not getting triggered....??BADI is Activated already.
Any other clue....
I'll definately reward points to all..
Thanks
Smita
Hey Hi Raja,
One More Question,
with reference to ur Previous Question that i found on SDN regrding "Value Help Dropdown in ISR From"
Even I need some Info regarind this....
I have Taken a DropDown from the ISR Control Library & Bind it to the Scenario characteristic "werks" , Also added "werks_KEY" & "WERKS_LABEL" for input help in the scenario. Then I have populated the Additional Data Table by setting multiple values for "werks_KEY" & "WERKS_LABEL" .
But Only One value is getting Populated in the dropdown.
Can u pls tell me the steps ...for the same with which u have succeded...
??
How to populate DropDown box with multiple values in adobe form usinf Script.....
ie. This.?????=????
pls reply !
Smita
See that you are incrementing the fieldindex in the ABAP code while looping or adding multiple values.
something like -
loop at <internal table>
add 1 to index.
additional<>-fieldindex = index.
additional<>-keyvalue = <itab>-key.
additional<>-fieldvalue = <itab>-field.
endloop.
Thanks and Regards,
Anto.
Hi Smita,
Sorry, was bit late due to some NETWORK Problems @ our client site.
Well, please have this sample coding.
<i> data : WA_DOCUMENT_DATA TYPE SODOCCHGI1,
INT_OBJECT_HEADER TYPE STANDARD TABLE OF SOLISTI1,
WA_OBJECT_HEADER TYPE SOLISTI1,
INT_RECIEVERS TYPE STANDARD TABLE OF SOMLRECI1,
WA_RECIEVERS TYPE SOMLRECI1.
*
CLEAR WA_RECIEVERS.
WA_RECIEVERS-RECEIVER = 'SAPUSERID'.
APPEND WA_RECIEVERS TO INT_RECIEVERS.
CLEAR WA_OBJECT_HEADER.
WA_OBJECT_HEADER-LINE = 'TESTING BADI FOR ISR SCENARIOS'.
APPEND WA_OBJECT_HEADER TO INT_OBJECT_HEADER.
CLEAR WA_OBJECT_HEADER.
CONCATENATE 'Created by:' GENERAL_DATA-CREATED_BY-USER_ID '-'
GENERAL_DATA-CREATED_BY-FULLNAME '-' SY-DATUM '-' SY-UZEIT INTO WA_OBJECT_HEADER-LINE.
APPEND WA_OBJECT_HEADER TO INT_OBJECT_HEADER.
CLEAR WA_OBJECT_HEADER.
CONCATENATE 'Initiated by:' GENERAL_DATA-INITIATED_BY-USER_ID '-'
GENERAL_DATA-INITIATED_BY-FULLNAME '-' SY-DATUM '-' SY-UZEIT INTO WA_OBJECT_HEADER-LINE.
APPEND WA_OBJECT_HEADER TO INT_OBJECT_HEADER.
*
*
*
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOCUMENT_DATA
DOCUMENT_TYPE = 'RAW'
PUT_IN_OUTBOX = ' '
COMMIT_WORK = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
OBJECT_HEADER = INT_OBJECT_HEADER
OBJECT_CONTENT = INT_OBJECT_HEADER
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = INT_RECIEVERS
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.</i>
Hope this helps.
Appreciate your rewards as per the usefulness of the reply.
And also let us know if there is any more problem.
Regards
<i><b>Raja Sekhar</b></i>
Hello Smita/Gyan,
Well, I think this snippet should answer your question.
<i> if user_command = 'PERSG'.
READ TABLE SPECIAL_DATA INTO LS_SPECIAL_DATA WITH KEY FIELDNAME = 'EG_NEW'.
IF SY-SUBRC = 0.
MOVE LS_SPECIAL_DATA-FIELDVALUE TO W_PERSG.
SELECT * FROM T503 INTO CORRESPONDING FIELDS OF TABLE ESG_TAB
WHERE PERSG = W_PERSG.
CLEAR INDEX.
LOOP AT ESG_TAB INTO WA_ESG_TAB.
CLEAR W_PTEXT.
SELECT SINGLE PTEXT INTO W_PTEXT FROM T503T
WHERE PERSK = WA_ESG_TAB-PERSK.
ADD 1 TO INDEX.
CLEAR LS_ADDITIONAL_DATA.
LS_ADDITIONAL_DATA-FIELDINDEX = INDEX.
LS_ADDITIONAL_DATA-FIELDNAME = 'ESG_NEW_KEY'.
LS_ADDITIONAL_DATA-FIELDVALUE = WA_ESG_TAB-PERSK.
APPEND LS_ADDITIONAL_DATA TO ADDITIONAL_DATA.
CLEAR LS_ADDITIONAL_DATA.
LS_ADDITIONAL_DATA-FIELDINDEX = INDEX.
LS_ADDITIONAL_DATA-FIELDNAME = 'ESG_NEW_LABEL'.
CONCATENATE W_PTEXT '(' WA_ESG_TAB-PERSK ')'
INTO LS_ADDITIONAL_DATA-FIELDVALUE.
APPEND LS_ADDITIONAL_DATA TO ADDITIONAL_DATA.
ENDLOOP.
ENDIF.</i>
Hope this solves your other problem too.
Regards
<i><b>Raja Sekhar</b></i>
Hi Smitha,
I am facing similar kind of issues in triggering the BADI, QISR1 with the event from Adobe form.
My scenario is like developed a simple Adobe form and where a 'SEARCH' button is placed in the layout, now the when this SEACRH button is clicked it should fetch some metrial data based on the material number passed from the PDF form.
Here I have followed the same process as you have written, but still BADI is not triggered. I am sure, I am missing something.
As you have written that your problem has got solved, kindly share the solution in details.
Best Regards,
Sriyash
Hi Smitha,
1. Write the script -java script , click or exit events
xfa.record.CONTROL_PARAM.ISR_EVENT.value = "<EVENT>";
app.eval("event.target.SAPSubmit(false);");
2. Write the implementation for the respective <event>.
Note, the event name that is geting trigerred while clicking the 'Review Form' button in the portal is also - 'CHECK'. You may use either the same name or choose to use a different name as desired (considering te performance and the conditions in which this event has to e triggerd.).
Hope this will solve you problem.
Thanks and Best Regards,
Anto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anto,
Thanks alot for reply ! U r the only person responding for these queries related to ISR!
Hey I did the same thing u mentioned but ,
1. Can u tell me what kind on Button do i need to use. Standard Button or Submit to SAP or any else.
If i use Standard Button it gives me error for Syntax for this line "app.eval("event.target.SAPSubmit(false);");". & If I take SUBMIT Button without<b> false</b>
it gives no error.
2. I have written this script for event "DISP" on Click of Button & write corresponding logic for Event Name DISP in BADI User Command.
3. Also comfirmed that event name is getting populated in <b>ISR_EVENT</b> Field through script whenever Button is Clicked , <b>But the Problem is BADI IS not getting Called ??</b>
4. I am Using ECC6 Is the problem becoz of that, Are u sure this thing work on ECC6??
Pls Help....
If U dont mind can I have ur Contact details so that I can discuss my problem with u...??
Thanks,
Smita
Hi,
1) If you want to create an event on the click of button then, use following code.
On the Mouse down event:
$record.CONTROL_PARAM.ISR_EVENT = "EVENT_NAME"
then, on CLICK event write this code:
app.eval("event.target.SAPSubmit();");
2) For creating event on Text fields, do the following:
On the EXIT event write this Form Calc script:
xfa.record.CONTROL_PARAM.ISR_EVENT.value = "EVENT_NAME";
app.eval("event.target.SAPSubmit(false);");
Now, to catch these events you have to write ABAP Code in the method SCENARIO_PROCESS_USER_COMMAND.
Create a Custom FM. like ZHR_PCR_XXXX_USER_COMMAND, with following
parameters:
IMPORT:
FLT_VAL TYPE QSCENARIO
FIELD_INFO TYPE QISRTFIELD_INFO
MODE TYPE QISRDMODE
FORM_VIEW TYPE QISRDFORMVIEW
EXPORT:
RETURN TYPE BAPIRET1
CHANGING
PAGE TYPE QISRDFORMPAGE
USER_COMMAND TYPE SYUCOMM
GENERAL_DATA TYPE QISRSGENERAL_PARAM
SPECIAL_DATA TYPE QISRTSPECIAL_PARAM
ADDITIONAL_DATA TYPE QISRTSPECIAL_PARAM
The USER_COMMAND field contains the event name. Use Switch Case for performing desired operations on different events.
CASE user_command.
WHEN 'EVENT_NAME'.
Data Processing.
ENDCASE.
Thanks,
Amit
Message was edited by:
Amit
Hi Amit,
Thanks for reply !
I did the same way using SABMIT to SAP Button...
But didnt understand What is the need to create Custom Function , Cant we Directly write code in BADI Usercommane as...
<b>method IF_EX_QISR1~SCENARIO_PROCESS_USER_COMMAND.
DATA: ls_special_data TYPE qisrsspecial_param.
case user_command.
when 'DISP'.
Loop at special_data into ls_special_data.
case ls_special_data-FIELDNAME.
when 'PERNR'.
ls_special_data-FIELDVALUE = '00003000'.
when OTHERs.
endcase.
MODIFY special_data FROM ls_special_data.
endloop.
endcase.
endmethod.</b>
Awaiting Reply!
Smita
Hi Smitha,
Do use elements from ISR Control library. Refer Note - 741381, 947633.
Use the standard button.
Also check where the control is going, by putting an external break point in your code.
Thanks and Best Regards,
Anto.
btw, don't forget to reward points. there are few people in SDN (for ISR)who are ready to help and always helped with their limited knowledge. Also remenber to close your questions once you get the required answers.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.