In my report I am calling the transaction VA01 with BDC data, and everything works as expected, the data is being filled correctly, but bdc_okcode /00 does not work.
I simply add the ok-code to the internal table:
gs_bdcdata-fnam = 'BDC_OKCODE'.
gs_bdcdata-fval = '/00'.
APPEND gs_bdcdata TO gt_bdcdata.
...
CALL TRANSACTION 'VA01' USING gt_bdcdata.
I get a popup that shows the ok code.
My expectation is that it should navigate to the next dynpro.
Also I tried to record the transaction through the transaction SHDB to see if I have to do something differently but the BDC data is basically the same. Playing back the recording shows the same popup with the code.
How can I solve that?
The MODE addition is not used by the CALL TRANSACTION.
If one of the additions MODE or OPTIONS FROM is not used, the effect is the same as if mode had the content "A". Which means the call transaction stops by each screen.
It has to be called like this:
DATA lv_mode TYPE char1 VALUE 'N'. "N - BI won't stop, E - will stop by error, A - will stop at every screen
CALL TRANSACTION 'VA01'
USING gt_bdcdata
MODE lv_mode.
A better option is to use the OPTIONS FROM addition, this gives you more opportunities:
DATA: ls_options TYPE ctu_params.
ls_options-dismode = 'N'. "see explanation above
CALL TRANSACTION 'VA01'
USING gt_bdcdata
OPTIONS FROM ls_options.
Related
I'm running a LoadRunner test , upon user failure at login /even at any other transaction it has to fail and execute log off portion of the script.
Note: I have put text check and with textcheck count if the transaction fails( using if condition I have handled it) it then ends transaction with fail status .I would need solution to perform log off also at the point where the if condition fails.
Can anyone share me with an example to execute log off when textcheck fails.
Depends upon your language choice.
Assuming you have the default language of C with your HTTP virtual user, then simply implement a logout function which contains your logout code. Call that function upon failure of your condition. A "return 1;" inside of that if/then conditional will also start a new iteration immediately. "return 0;" goes to a new iteration with respected pacing. "return -1;" kills the virtual user altogether.
I have a Modify statement to update a custom table after which I am calling BAPI_CONTRACT_CHANGE. When BAPI failed to change the document it's calling BAPI_TRANSACTION_ROLLBACK. However, it's not changing the data back in my custom table which was updated by Modify statement.
IF gt_return[] IS NOT INITIAL.
READ TABLE gt_return INTO gwa_return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
MESSAGE i021(zxx).
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = abap_true.
ENDIF.
ENDIF.
Appreciate your response.
Modify statement is present somewhere before the bapi call.and also this program can be run from external portal . The behaviour is as expected when I run it from the portal i.e, BAPI_TRANSACTION_ROLLBACK works and data doesn't get updated in the custom table. It fails only when I run it from ECC.
You get an implicit commit on each PBO screen interaction.
So any user interaction after the Insert/modify/update DB will be committed without code needing to issuing a commit work.
if you want to rollback , it must be done before the next PBO cycle.
Hi I'm trying to add a labor transaction from an action automation script with the object being ASSIGNMENT in Maximo. I am currently trying the code below.
labTransSet = MXServer.getMXServer().getMboSet("LABTRANS",ui);
labTrans = labTransSet.add();
labTrans.setValue("laborcode", userLabor);
labTrans.setValue("wonum", assignWonum);
sds1=SimpleDateFormat("hh.mm aa").format(firstDate);
sds2=SimpleDateFormat("hh.mm aa").format(Date());
labTrans.setValue("STARTTIME", sds1);
labTrans.setValue("FINISHTIME", sds2);
labTransSet.save();
labTransSet.close();
userLabor is the username of the current user
assignWonum is the assignment work order number
firstDate is the scheduled date field from the assignment
The labor record is being added correctly with the right data, but when I go to route my workflow after the script is called from a button, I am given the warning BMXAA8229W WOACTIVITY has been updated by another user and the work order does not route. I am under the impression that this is happening because the assignment object for the script is being queried at the same time I try to add and save a labor record. Does anyone know if my guess is correct or what else the problem is and how I can fix this? Thanks
That error occurs because Maximo already has one version of the record loaded into memory when the record in the database is modified independently. Maximo then tries to work with the in-memory object and sees it doesn't match what is in the database and throws that error. Timing doesn't really have anything to do with it (other than that an edit happened at some point after the record was loaded into memory).
What you need to do is make sure you are modifying the exact same task/assignment/labtrans record that has already been loaded into memory. That "MXServer.getMXServer().getMboSet" stuff is guaranteed to use a new object. That is how you start a new transaction in Maximo; how you make sure you are not using anything already loaded into memory. I suspect you want to get your set off of the implicit "mbo" object the script will give to you.
I've created an experiment in psychopy builder in which participants must vocally name pictures presented onscreen (for example, if a picture of a chair appears, the participant has to respond by saying "chair"). I've set up a code component to detect each vocal response, which ends the trial and initiates the next one. This part of the experiment works well, however I'm having trouble integrating EEG recording.
Some important information:
My trial loop reads images and triggerVal's out of a .csv file. I have an image component (called english_naming) that displays images for participants to name out-loud. The component's STOP field is defined as $vpvk.event_onset - this forces the trial to end and the next one to begin upon detection of a vocal response.
So, here is my (working) code component at present:
Begin Experiment:
from psychopy import parallel
port = parallel.port(address=61432)
Begin Routine
vpvk = vk.onsetVoiceKey(
sec=10) # creates the voice key
vpvk.start() #starts recording.
port.setData(triggerVal) # tells psychopy to read trigger values from the .csv file
End Routine
vpvk.stop() # ends the recording
port.setData(0) # resets the trigger value to 0 for the start of the next trial
My problem is this
At present, parallel port events are time-locked to the start of each trial, but I need them to be time-locked to participant's vocal responses. I tried inserting if vpvk.event_onset(): above port.setData(triggerVal), but this fails to generate any trigger codes at all. I've also tried if english_naming==FINISHED but the same problem occurred. I've tried a bunch of variants on these two lines of code, but nothing I can think of seems to work.
I would really really appreciate any advice on this problem. Thanks in advance!
Good day
I'm trying to perform load testing with LoadRunner 11. Here's an issue:
I've got automatically generated script after actions recording
Need to catch Session ID. I do it with web_reg_save_param() in the next way:
web_reg_save_param("S_ID",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path=/app/;",
LAST);
web_add_cookie("S_ID; DOMAIN={host}");
I catch ID from the response (Tree View):
D2B6F5B05A1366C395F8E86D8212F324
Compare it with Replay Log and see:
"S_ID = 75C78912AE78D26BDBDE73EBD9ADB510".
Compare 2 IDs above with the next request ID and see 3rd ID (Tree View):
80FE367101229FA34EB6429F4822E595
Why do I have 3 different IDs?
Let me know if I have to provide extra information.
You should Use(Search=All) below Code. Provided your Right and left boundary is correct:
web_reg_save_param("S_ID",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path=/app/;",
"Search=All",
LAST);
web_add_cookie("{S_ID}; DOMAIN={host}");
For Details refer HP Mannual for web_reg_save_param function.
I do not see what the conflict or controversy is here. Yes, items related to state or session will definitely change from user to user, one recording session to the next. They may even change from one request to the next. You may need to record several times to identify the change and use pattern for when you need to collect and when you need to reuse the collected data from a response in a subsequent request.
Take a listen to this podcast. It should help
http://www.perfbytes.com/dynamic-data-correlation