2005 Nov 03 7:58 PM - last edited on 2024 Feb 04 1:33 AM by postmig_api_4
Hi,
Is it possible to modify the session values and then either process the session or create a new session.
Looking forward for feedback on this strange requirement.
Functional spec description:
The program intends to post the depreciation documents (previously generated by FI-AA module) in the FI-GL module, considering the current XYZ rate.
Justification:
The objective is to use the standard batch-input session generated by RABUCH program, make some adjustments and post the values into FI-GL. The selection screen must contain the batch-input session name and the processing options (on-line, background and view errors only).
Thank You,
Rao
2005 Nov 03 8:25 PM
Yes it is possible. Basically you will do programatically what SM35 does. You can select the session that you want to select using BDC_OBJECT_SELECT function module. It returns you the APQI information. Then you can call BDC_OBJECT_READ to read all the transactions in that session, or a specific transaction, by passing the transaction counter. This call will return you with a BDCDATA internal table. Now if you can parse through it and edit it in the program, you can come up with the new BDCDATA and then use it to create a new session or you can overwrite the existing one using BDC_OBJECT_UPDATE function module. If you want the edits done online, then you will use BDC_OBJECT_EDIT function module.
Once you have the new/edited session available, you can then call BDC_RECORD_PLAY to do like in SM35.
Look for documentation and also other BDC* function modules.
Srinivas
Please don't forget to close the post once answered.
2005 Nov 03 8:25 PM
Yes it is possible. Basically you will do programatically what SM35 does. You can select the session that you want to select using BDC_OBJECT_SELECT function module. It returns you the APQI information. Then you can call BDC_OBJECT_READ to read all the transactions in that session, or a specific transaction, by passing the transaction counter. This call will return you with a BDCDATA internal table. Now if you can parse through it and edit it in the program, you can come up with the new BDCDATA and then use it to create a new session or you can overwrite the existing one using BDC_OBJECT_UPDATE function module. If you want the edits done online, then you will use BDC_OBJECT_EDIT function module.
Once you have the new/edited session available, you can then call BDC_RECORD_PLAY to do like in SM35.
Look for documentation and also other BDC* function modules.
Srinivas
Please don't forget to close the post once answered.
2005 Nov 03 8:32 PM
Hi Srinivas,
Thank you for such a swift reply,
the technical desgin is still being reviewed.
Looks a great start for me, i greatly appreciate
your feedback.
I will definitely try this approach with some other session and let you know my progress.
Regards,
Rao
2005 Nov 08 4:32 PM
Hi Srinivas,
All the BDC function modules updates the session values as desried.But the CALL FUNCTION 'BDC_RECORD_PLAY' doesn't process the session selected as desired.
It prompts for selecting the type of processing but the processing option is one of my selection parameter.I am looking for a way to process the sessio based on my selection parameters.
Functional spec description for the report program:
The selection screen must contain the batch-input session name and the processing options (on-line, background and view errors only).
Please give me feedback
2005 Nov 08 4:36 PM
This function module does not have the provision to take those parameters. So one option is to remove the BI options from your selection screen and let this call provide those selections. I will see if there is any other way to bypass this pop-up.
Srinivas
2005 Nov 08 4:41 PM
If you look at the logic of that function module, all it is doing is calling a screen to present you with those options, and then submitting a report. So you can directly submit the program in your code instead of calling this function module. See the extract of the SUBMIT statement from this function module.
submit rsbdcctu with groupid = bdc_record-groupid
with qid = bdc_record-qid
with mode = ctu_params-dismode
with update = ctu_params-updmode
with cattmode = ctu_params-cattmode
with defsize = ctu_params-defsize
with racommit = ctu_params-racommit
with nobinpt = ctu_params-nobinpt
with nobiend = ctu_params-nobiend
with memory = p_memory_id
and return.
Personally, I prefer to remove those selections from your selection screen and let this function module take care of it. You are still following your spec, only you are presenting the options later.
Srinivas
2005 Nov 08 5:03 PM
Hi Srinivas,
I think submiting the program rsbdcctu
with groupid = bdc_record-groupid looks like the best option , that way i still give the user the processing options.
I will give the following suggestion to the business people and i feel this looks like the best option.
Thanks to your valuable feedback.
Rao
2005 Nov 03 8:26 PM
Hi Rao,
I understand ... nothing
maybe you want to execute batch-input ? RXBDCSUB ?
Rgd
Frédéric