on 03-01-2011 6:46 AM
Hello,
I am using SUP to create a sales order application. In my MBO I have a create operation which calls a BAPI to create a sales order. How can I retrieve the return value (saled doc number) and display it on a screen and display it as an Alert of BB application.
Regards
Nidhideep Bhandari
Hi ,
i also have same requirement , i have used CBAPI to create Maintenance Order ( this is HWC application ) and i need to display newly created "ORDER NUMBER " on another screen with a message . . ORDER NUMBER is system generated number .
Thanks
Regards,
Thushara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
We were able to solve this issue using some custom logic.
Let the operation BAPI update a custom table in SAP with the error messages.
Create a BAPI to read from this custom table is SAP.
Create an MBO based on this new BAPI.
Sync from front end after the operation is completed.
The local MBO table should have the data in it with the error messages.
Hope this helps! Cheers!
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Have you solved the issue cause I have same question too, I can't get an output value while creating an operation.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi rahulmb ,
Thnx for replying, my point is when i create a "create operation" with BAPI's i choose inputs beside them i choose an output as well but i can't see the ouput parameter on creation structure . for example : if i create a new record on the device if the same record is already in backend then my output returns "it already contains etc.." what i mean is i cant see the output parameter either in eclipse workspace or in java class.
regards
Hi,
When you add the CREATE operation to the MBO, you have to choose the input and ouput parameters. The parameters which are selected as the input parameter will only be available in the creation structure. The output structure will not be available there. So you may have to create another screen which displays the ouput, in your example whether the record already exist or not.
Regards,
Rahul Muraleedharan.
Raulmb,
I have created a MBO which containts only output and created a "create operation" structure then created two different screens for corresponding MBO and structure, but when i run the operation the output didn't change ! so there has to be a relation between them because. Hope im clear
Regards
Hi,
Sorry, I didnt get the exact scenario. can you please give a bit more explanation.
As per my understanding you have created an MBO as output parameter of a BAPI/RFC. Then you have created a CREATE operation for the MBO. Have you checked the input or the output parameter of the Modify BAPI/RFC?
Regards,
Rahul Muraleedharan.
rahulmb ,
first of all my rfc has an output if user saves a request which already in backend then rfc returns a message by that output, so as you said even i choose output parameter while creating an operaiton structure im not able to see that, right ?. So i created a MBO for output and a operation structure. I run the applicaiton and making a operation but the output doesn't change, even i entering same records. The output has to show an error message but nothing shows. In my opinion,im not sure but the output has to have a relation to the moment of the operaiton i mean it has to relate to corresponding operation by making any relation.
Regards
Hi Ozmrdn,
Have you fixed the issue ?
I wanted to know, how can we input the values via the application to the bapi/rfc method.., As far as I know., In native code, we need to create an instance of that particular MBO class and then access the operation responsible for sending the parameters to the BAPI which then updates the backend. Is that how it is done ?
If you have an operation that has return parameters, such as a create, you currently have to do this by creating a MBO and using that operation as the load operation for that MBO and map the return parameters to MBO attributes. When you invoke an object query on the MBO, it'll invoke the load operation, which will do the create, and you can then inspect the MBO instance's attribute values to determine what the return parameter values were.
HI David
We got your point of making Create Operation as an MBO, not as operation and then getting the output as attribute. As of my knowledge, i will make same number of personalization keys (= number of inputs to create operation) and provide them values while making UI.
But what are you suggesting, is related to some object query. Can you please brief on "Object Query" solution ?
Thanks in Advance.
Pankaj
Hi David Brandow,
I have tried your solution where I just created a MBO for my 'operation' and I'm using sync parameters to execute the RFC.
The problem I'm facing is, for example, if I create a record it gets saved in the MBO table and the record successfully gets created in SAP as well after a sync. But when I create another record and sync, the previously saved record in MBO table also gets executed so I'm getting duplicate entries in SAP.
Have you or anyone faced this problem?
Any response is appreciated. Please let me know if I'm not clear, I realized its a complicated scenario.
Thanks,
Sandeep
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.