‎2015 May 27 7:53 PM
Hi Expert!
I have a batch input programmed. If I execute the batch input in this way:
CALL TRANSACTION 'TM02' USING gt_bdcdata MODE 'A' MESSAGES INTO it_messages
I can see al dynpros and everything is ok.
But when I execute it in this other way (I need this way):
CALL TRANSACTION 'TM02' USING gt_bdcdata MODE 'N' MESSAGES INTO it_messages.
Nothing is made. I think that is because during the execution appears some messages (Type S and I any error) and the execution is stopped.
Also, when this happens I go to SM35 but my batch input is empty.
Can you please help me with these two issues?
Best Regards and thank you very much!
‎2015 May 27 8:15 PM
Sara,
Also, when this happens I go to SM35 but my batch input is empty.
If you want to process via SM35, you should not use call transaction. You should use the functions BDC_OPEN/INSERT/CLOSE. These functions write the data present in gt_bdcdata into the session so that you can process it via SM35.
The difference between, mode A and N is :
'A' will display all the screens
'N' will not display any screens.
The mode should not have any impact, it should be the data present in gt_bdcdata.
In order to check if there are any issues with the processing, change the mode to 'E'. This will stop the processing if an error message is raised in one of the screens.
Thanks,
Vikram.M
‎2015 May 27 8:07 PM
Have you looked at the contents of it_messages when running in mode 'N'? What messages are there?
Rob
‎2015 May 27 8:17 PM
Thank you very much for your help.
I always have messages type 'S' like in this case:
Also, after executing the Call transaction I have this code:
CALL TRANSACTION 'TM02' USING gt_bdcdata MODE 'N' MESSAGES INTO it_messages.
PERFORM f_close_group USING g_group.
So, I don't know why call transaction is interrupting when I use Mode 'N' I suposse that is cause there are messages.
In the other hand I think that " PERFORM f_close_group USING g_group." is never executed when the call transaction is interruped and maybe this is the reason because my batch input is empty in the SM35.
Can you please help me??
Best Regards
‎2015 May 27 8:26 PM
The problem is that these are errors that you can skip through when processing online by pressing enter, but will stop the batch input.
You have to analyze and fix these errors.
One is saying that you have entered a field that does not exist on the screen. The other is saying that the field you are using for input is longer than the screen field. (This can happen if you are using a date or currency for input, but the screen field is actually a character.
Rob
‎2015 May 27 8:15 PM
Sara,
Also, when this happens I go to SM35 but my batch input is empty.
If you want to process via SM35, you should not use call transaction. You should use the functions BDC_OPEN/INSERT/CLOSE. These functions write the data present in gt_bdcdata into the session so that you can process it via SM35.
The difference between, mode A and N is :
'A' will display all the screens
'N' will not display any screens.
The mode should not have any impact, it should be the data present in gt_bdcdata.
In order to check if there are any issues with the processing, change the mode to 'E'. This will stop the processing if an error message is raised in one of the screens.
Thanks,
Vikram.M
‎2015 May 27 8:26 PM
Hello and thank you very much for your help.
I have changed my code and now I use BDC_INSERT and I check that my batch input in SM35 has data, but One question:
It always create a batch input to execute in SM35?
I mean, my batch input changes data in TM02 and I have the batch input inside a function.What I need is that when the user execute the function data in TM02 is automatically updated and in case of errorrs (Only in case of errors) we can process the batch input in SM35. Have I this behaviour using BDC_INSERT instead of Call Transaction?
Also I still have problems whith the messages
Best Regards and thank you very much again.
‎2015 May 27 8:30 PM
SAP used to advise us when doing a call transaction session that got an error, we should then use create a batch input session so that the errors could be analyzed and fixed. This way, data is updated in real time, but you have a way to fix errors.
Rob
‎2015 May 27 9:13 PM
Sara,
Let me try to understand what you just said:
You have function which is used to update TM02. This you want to be done via call transaction and in case of errors schedule this to SM35? Am I correct?
If yes,you need to use call transaction and check the messages. If there are any errors then you can branch out to SM35 else skip batch input processing.
Did you check if there are any BAPIs? Why not use that instead of BDC?
‎2015 Jun 03 3:53 PM
Thank you very much for your good help.
Finally I made some corrections in my batch input so there were no errors and it is processed automatically.
What I did is use Call transaction and only in case of errors I used BDC_INSERT so then I can process my data through SM35.
Thanks again for your help. I have given points to all your messages.