on 04-12-2013 10:23 AM
Dear All,
I new to this BPC, and now currently I'm in BPC NW10 Project, My 1st BPC Project.
I have read almost all the documentation about logic script and BADI. And I can manipulate Data using Logic Script and BADI (UJO_Custom_logic) quite good for 1 Model.
For crossing between model, I have done using Logic Script Destination_App in logic script (From Source Application Model to Target Application Model), and Also in BADI (I'm using BADI UJO_Custom_logic to Retrieve the data from Target model to Source Model) and it works perfectly.
But actually the client doesn't want to retreive the data from target application model to source application model, they want to push data from Source Application Model to Target Application Model.
That's the documentation for BPC NW 7.5, for Destination App in badi, but I cant transport it to BPC NW 10, So I cant try Destination_App in BPC NW 10. So I tried to find another information, But I cant find any source code in BADI (ABAP Code), they only show only Logic Script Code.
Is there any sample BADI (ABAP Code) for Destination_App ? Because I saw from all documentation they only code like below in logic Script without showing any BADI (ABAP Code)
*START_BADI DAPP
DESTINATION_APP = "Finances"
ADD_DIM="INTCO=I_NONE"
*END_BADI
doesn't we need to Code ABAP in Badi ? if Yes can I have a sample code ?
if Not so we can just put Destination_App = 'Finances' , Add_Dim, Skip_Dim and Rename_Dim in logic script then the program will automatically push the data ? if Yes so what is the different using badi or not for Destination APP ?
Thank You
Regards,
Budi
Thank you Suresh and Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Budi,
I suggest you to write the "Write Back BADI" like below code...
* Source Appllication------------------------------------------
CALL METHOD zcl_bpc_basic_method=>data_extraction_infocube
EXPORTING
appset_id = 'PET_DEPOT'
application_id = 'SALES'
t_sel = lt_sel
IMPORTING
t_cube_data = lt_inv_tmp.
IF lt_inv_tmp IS NOT INITIAL.
LOOP AT lt_inv_tmp INTO ls_inv_tmp.
MOVE-CORRESPONDING ls_inv_tmp TO ls_inv_ip.
APPEND ls_inv_ip TO lt_inv_ip.
ENDLOOP.
ENDIF.
LOOP AT lt_inv_ip INTO ls_inv_ip.
*--------------------------------------------------------------
*TARGET APPLICATION -----------------------------------------
CALL METHOD zcl_bpc_basic_method=>data_extraction_infocube
EXPORTING
appset_id = 'PET_DEPOT'
application_id = 'COST_CENTER'
t_sel = lt_sel
IMPORTING
t_cube_data = lt_inv_tmp2.
IF lt_inv_tmp2 IS NOT INITIAL.
LOOP AT lt_inv_tmp2 INTO ls_inv_tmp2.
MOVE-CORRESPONDING ls_inv_tmp TO ls_inv_ip2.
APPEND ls_inv_ip2 TO lt_inv_ip2.
ENDLOOP.
ENDIF.
LOOP AT lt_inv_ip2 INTO ls_inv_ip2.
*----------------------------------------------------
*********************************
*********************************
IF ls_inv_ip-l_account = 'DT011_DI_0002' AND ls_inv_ip-signeddata IS NOT INITIAL.
READ TABLE lt_inv_ip INTO ls_inv_ip1 WITH KEY l_account = 'IP11234'
l_material = ls_inv_ip-l_material
l_time = ls_inv_ip-l_time
l_category = ls_inv_ip-l_category
l_product = ls_inv_ip-l_product
l_company = ls_inv_ip-l_company
l_currency = ls_inv_ip-l_currency
l_distributor = ls_inv_ip-l_distributor
l_version = ls_inv_ip-l_version.
*-----------------------------Writing back to target Application from Source with a calculation
IF sy-subrc = 0.
MOVE-CORRESPONDING ls_inv_ip TO ls_inv_op.
ls_inv_op-l_account = 'CALC1234'.
ls_inv_op-signeddata = ls_inv_ip1-signeddata / 100.
APPEND ls_inv_op TO lt_inv_ip2.
CLEAR : ls_inv_op.
ENDIF.
ENDIF.
*******************************
******************************
Like this you can Push the data from one application to another with calculations (If required).
Hope this helps ...
Regards,
Praveen K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to write back manually by defining Target model name in parameter. Use IF_UJO_WRITE_BACK to create reference variable and CL_UJO_WRITE_BACK=>CREATE_WRITE_BACK to create that reference variable as object.
At last use Reference variable->WRITE_BACK to write the data to your target cube.
Hope it helps!! If you are not clear let me know I will post the entire code here or will mail you guys
Thanks,
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
In below thread I did post the entire code for this same purpose. Please use your target model name as application name in your code.
http://scn.sap.com/thread/3377931
Hope it helps!!
Thanks,
Suresh
Hi Budi,
did you find any information on your question? I am facing a similar issue and would like to know if there is some help for this.
Thanks,
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please note the description from the Overview for this SCN Space:
Official SAP Help Portal Community. Find comments on SAP product documentation (such as SAP Application Help, also known as SAP Library), and read best practices shared by the community.
Based on the above, I believe you posted your query into the incorrect SCN Space. Please use the Forum Finder for the New SCN document to find your product and post into that SCN Space.
With best regards,
Dominik
SCN Moderator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
16 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.