2013 Jun 19 7:07 AM
i have added some code...in tcode MB21.
so that the comp name and the ip address of the comupter
creating reservation could be tracked!
my code is inside the include >>MM07RFF0
i have coded few function modules in a perform.
What i am facing the issue is:
if i place the BREAK-POINT inside the code, (or i debug the placed code)
then the code works perfectly fine.
ip and comp terminal name gets stored in DB Table.
on the other hand, if i remove all the break-points and dont debug,
then, this code is indeed fired(i am pretty sure becoz i have placed one message inside it).
but the comp name and ip address does not gets stored in DB Table.
1 entry which i have marked in screen shot is the scenario..which i debugged!.
i have used these 2 function modules.
I am Literally Confused and have no idea why this is happening.
2013 Jun 19 12:53 PM
Hi Abhishek,
Use statement WAIT UP TO '1' SEC before update syntax. It will update the values in db table.
Regards,
Supriya.
i have added some code...in tcode MB21.
so that the comp name and the ip address of the comupter
creating reservation could be tracked!
my code is inside the include >>MM07RFF0
i have coded few function modules in a perform.
What i am facing the issue is:
if i place the BREAK-POINT inside the code, (or i debug the placed code)
then the code works perfectly fine.
ip and comp terminal name gets stored in DB Table.
on the other hand, if i remove all the break-points and dont debug,
then, this code is indeed fired(i am pretty sure becoz i have placed one message inside it).
but the comp name and ip address does not gets stored in DB Table.
1 entry which i have marked in screen shot is the scenario..which i debugged!.
i have used these 2 function modules.
I am Literally Confused and have no idea why this is happening.
2013 Jun 19 7:10 AM
Hi,
are you sure your program used a DIALOG process ?
when you remove the BREAK POINT, did you run the program ? or that was a user ? if yes, are you sure about authorization ?
regards
Fred
2013 Jun 19 7:19 AM
are you sure your program used a DIALOG process ?
i am not sure about whether its a dialog process or not. infact i dont know how to check that or what does that mean.Can u shed some more light on that!
when you remove the BREAK POINT, did you run the program ? or that was a user ? if yes, are you sure about authorization ?
indeed, i had executed the program multiple times, see the table screen-shot,these all reservation have been created by me only, only one entry in which u can see the comp name and ip address...that reservation i debugged my code by putting break-point.
2013 Jun 19 7:30 AM
For the first point, if you used for example Good issue in VL32n, SAP will prepare all the data, and when it saves the data, that's occurs in background mode. So there is not anymore a computer associated to the process.
a simple test could show you that : instead of a computer name, try to put the content of SY-BATCH
if X, you are in background.
2013 Jun 19 8:05 AM
i have checked the value of SY-BATCH when the break-point gets fired!
and it is BLANK.
I am still banging my head on my desk
2013 Jun 19 8:20 AM
you are in debug ...
do it without debug
and put the value into your table
fred
2013 Jun 19 8:47 AM
I have removed break-points. and checked the value of SY-BATCH (not in debug)
i have placed a message of TYPE 'I' so that i can check the value of SY-BATCH.
BUT the value is still initial.
this also proves that the code is getting triggered!
2013 Jun 19 9:36 AM
I have set a system break point to try to find what's going on ..
and when I tried to create a view I have stop in this break (I forget to remove it)
I see this code
* COMMIT in (classic) update task?
call function 'TH_USER_INFO'
importing
task_state = i.
%_task_state = i.
j = task_vb. x4 = j.
if not %_task_state z x4. "update task must not be active
l_update_task = 'X'.
endif.
first, SAP didn't specify username ... client ..
and you could find if your are in update task .. (I think not)
could you try the SAP way ?
2013 Jun 19 11:35 AM
it would be very kind of you fedrik, if u kindly explain what u r trying to say,
i have made some changes in the declaration of function module,
correct me if i am getting u wrong.
2013 Jun 19 12:45 PM
I'm sorry, my english teacher try to prevent me about the problem I will have ... but .. she failed
remove the client & user in the exporting part
Fred
2013 Jun 19 1:32 PM
still nothing
i'll get fired... today
and still nothing is captured..
2013 Jun 19 2:03 PM
arf
did you try to put a break point with a condition after the call of the function ?
if v_terminal eq space.
break-point.
endif.
2013 Jun 19 2:29 PM
thanks fredric for your continuous efforts.
finally the statement came out as a life saver for me
WAIT UP TO '1' SEC .
all i want to know, the magic behind this statement!
2013 Jun 19 2:34 PM
I'm little bit afraid with the '1' why not '2' ... '3' ?
the good point, you have your solution
Fred
2013 Jun 20 8:32 AM
Regards,
Raymond
2013 Jun 19 7:40 AM
Probably this is a commit issue. Have you tried to call your perform on Commit process ?
PERFORM GET_COMP_NAME ON COMMIT.
Cheers!
Abhinab
2013 Jun 19 7:46 AM
this is definitely not a commit issue:
check this screen-shot:
2013 Jun 19 2:03 PM
Hi Abhishek,
Here in your screen shot both table and work area has the same name may system get confused while you update the system so kindly change the work area name may it work.
In update statement pass the condition like set or where.
Here you are update old data it will work if suppose you are updating new data you should use modify key.
Warm Regards,
John.
2013 Jun 19 12:53 PM
Hi Abhishek,
Use statement WAIT UP TO '1' SEC before update syntax. It will update the values in db table.
Regards,
Supriya.
2013 Jun 19 1:36 PM
i have already used COMMIT WORK AND WAIT.
and please be clear where to use wait statement.
2013 Jun 19 1:49 PM
Hi Abhishek,
if you are using break point means its working..write the WAIT up to 1 sec instead of the break-point.
am also faced the same issue after this statement its working fine.
Regards,
Gurunath
2013 Jun 19 2:01 PM
IT WORKED!
but why is that so.
what difference does it make it we don't write this statement?
2013 Jun 19 2:28 PM
Hi Abhishek,
am not sure why it will happen, please find the following links may help for your query.
http://help.sap.com/saphelp_45b/helpdata/en/34/8e73b76df74873e10000009b38f9b8/content.htm
http://help.sap.com/abapdocu_702/en/abapwait_up_to.htm
Regards,
Gurunath
2013 Jun 19 2:06 PM
Hi,
write WAIT statement in place of breakpoint. it will work.