Quantcast
Channel: SCN : All Content - BOPF Application Framework
Viewing all 309 articles
Browse latest View live

Foreign key relations not maintained on DB

$
0
0

Hi,

 

what about foreign key relation between PARENT_KEY field in a subnode DB table to the DB_KEY field in the DB table of the superior node?

 

As far as I see such relations are not maintained in the DDIC meta data.

 

Such relations would be quite helpful to get the persisted DB data model complete and to simplfy the creation of corresponding CDS views.

 

As far as I understood the DB tables are generated by BOPF design time. Is this simply missing functionality in the DB design time or is there any misunderstanding from my side?

 

Would it be problematic to maintain such relations manually in SE11 after generation?

 

Regards, Jürgen


Extra authorization check in case of node categories

$
0
0

Hi experts,

 

I have an authorization object and authorization field linked to a component of my BO node. This worked correctly, but after adding multiple node categories and disabling the default node category, I'm no longer authorized to create new instances of the node.

 

It appears that, immediately after deriving the node category from the parent node in de node class method SET_NODE_CATEGORY, extra authorization checks are executed. Which seems desirable. However, at that moment, all fields of my node and thus also the field to which the authorization check is linked are still initial, and authorization will always fail.

 

I noticed that I could derive the value for this authorization field from the parent node using a custom node check class, based on /BOBF/CL_LIB_AUTHCHECK_W_QUERY.

 

Can someone please confirm this is the optimal way to go?

 

Alternatively I could give all users authorization to create the 'empty' authorization field, but that's also not really an option which makes me happy

 

Many thanks in advance!

 

Kr,

Bjorn

Semantical difference symsgty /bobf/cm_frw=>ty_message_severity ?

$
0
0

Hi,

ok, this may be a technical detail but what is the semantical difference between the types symsgty and /bobf/cm_frw=>ty_message_severity ?

 

As far as I see there is none.

 

Please help.

 

It would be nice to have more detailed documentation attached to the BOPF core objects in the system (may be you can use ABAP Doc), But even standard SE24 doc would be nice, especially for public and protected methods/attributes/types.

 

Crawling in SCN/SDN/wiki/shares or what ever is quite cumbersome.

 

Regards, Jürgen

Very Good Article from Martin Fischer about BOPF

$
0
0

Hello community,

 

here a sidekick to an article from Martin Fischer about BOPF - in German language.

 

Hey Martin, thank you very much for this

 

Cheers

Stefan

BOBX, edit mode not avaible

$
0
0

When entering bobx transaction and open enhancement.

 

i have this popup:

 

2015-04-29_103101.png

 

And after, i can't add alternative key,validations ....

 

temp.png

 

Thx

How select Child Item.

$
0
0

Hi experts

I want to select child_item of charge item /n/bobf/conf_ui

somebody did it in code for BOPF?

 

bopf.png

thanks

Integration of BOPF Business Objects and Existing Applications (Part 1/2)

$
0
0

In some cases it is required to integrate BOPF business objects into existing applications. The invocation of logic implemented in BOPF business objects can easily be achieved by the help of service manager. However, the transactional behavior of the BOPF and the existing application must be also taken into account. For that reason BOPF offers a special Master/Slave transaction manager concept, that is described in the following sections. In the second part, a concrete example shows the implementation of an integration scenario.

In a standalone BOPF application, the consumer ends the current transaction by the help of the standalone transaction manager. It provides the option to make the current transaction undone (called "cleanup") or to save all changes since the last save to persistency (called "save").

 

Example:

DATA(lo_transaction_manager) = /bobf/cl_tra_trans_mgr_factory=>get_transaction_manager( ).
lo_transaction_manager->save( ).


While executing the save, BOPF registers by default an update task to write the modifications done in the current transaction from buffer into the database tables. Finally, a COMMIT WORK is executed. However, there are situation that do not allow BOPF to raise a COMMIT WORK. For instance, if the BOPF application is integrated into an existing application or foreign application framework.In that case, a slave transaction manager can be used by the foreign application to prepare the BOPF objects of the current transaction for the saving and afterwards to execute the COMMIT WORK. The foreign application is called master transaction manager as it invokes the COMMIT WORK and ROLLBACK WORK - and not the BOPF:

slave.jpg

The master transaction manager (called "Legacy Application" in the picture) has to call Finalize/CheckBeforeSave/... on the slave transaction manager before triggering the COMMIT WORK. This triggers for instance the execution of the finalize determination of the participating BOPF BOs.

 

Example:

DATA(lo_slave_transaction_manager) = /bobf/cl_tra_trans_mgr_factory=>get_slave_transaction_manager( ).

lo_slave_transaction_manager->finalize( ... ).

After the COMMIT WORK, the BOPF BOs shall be invoked via the slave transaction manager's AfterSuccessfulSave core service. This is in principle only necessary if the the participating BOs have AfterCommit determinations configured and it is intended to continue with the next transaction in the same session.


In this document the concept of integration of BOPF business objects and existing applications is decribed. In the second part, an implementation example is provided.

BOPF and Web Services in ERP

$
0
0

Hello.

 

In BOBX configuration I see the fields with title "proxy" everywhere. This leads me to believe that the following two scenarios should be supported:

 

1) Expose BOPF as web service to the outside world.

2) Consume web service through BOPF.

 

This could in a way be deducted in ERP EHP6 when looking at the BO category "message" and comparing to category "business object". In EHP7 this message BO category is no longer there.

 

Also, there is a deactivated function that generates customizing for a buffer class CL_BOPF_BUFFER_SPROXY that does not exist.

 

So what is the support for the above scenarios in ERP EHP7? Also, is there a buffer class so that we can read a web service message through its proxy?

 

Kind Regards

Martin


change representation node in FPM

$
0
0

Hi everyone,

 

I have a business object, which has a representation node. When I change the date of this business object in Floorplan manager, it seems that the date of respresentation node are read-only at all times, regardless of edit mode or display mode.

 

Thanks in advance

 

yinxiao

Issue in Retriving of Dynamic populated dropdown filed

$
0
0

Hello ,

 

In my BOPF application I have  two drop down field say  dropfield1 and dropfield2.  I have check in my FBI view exist class in method /BOBF/IF_FBI_VIEW_EXITINTF_RUN~ADAPT_DATA  and as per that check I am defaulting one of the value in the dropfield2.

 

This dropfield2 which was populated dynamically through the code part  needs to  be retrieved in my BOPF action .The IO_READ->retrieve  successfully retrieve data  table (et_data) but  the field which is dynamically populated  is blank in the et_data. Dynamic value is one of the dropdown list value.

 

Where as when I manually dropdown the field dropfield2 and select a dropdown list value at that time IO_Read->Retrive  returns  the data table(et_data) with all the fields filled including the manually dropdown value.

 

Do I need any other configuration for dynamic population in LIST_GUIBB or do I wrongly default the values in ADAPT_DATA?

 

While debugging I can see the dynamic default dropdown value in CT_DATA  of View exit as well as in Feeder class.

 

Let me know your thoughts and input on the issue.

 

Regards,

Partha

Can I use BOPF for extra high volume data?

$
0
0

I have a customer requirement in TM enterprise area, where I need to load one million record lines in batches (filtered) into a FPM UI. But I see that, for even a record size of 10,000 line items, BO loading is taking between 2-3 minutes. Customer acceptance for these kind of data load is 3 seconds. Can you please let me know, how to fine tune BO to support these work load. I have done a complete ABAP stack trace and see that, FPM takes only few milliseconds to load the data, where as BOPF takes more than 120 seconds to load this.

So, is BOPF meant for high volume data?

 

Sunil.

Alternative key containing multiple attributes

$
0
0

Dear experts,

 

For a certain requirement in HR, I'm trying to create a cross-BO association based on an alternative key, which consists of two attributes.

 

According to How to Create Alternative Keys with BOBX, I created a structure containing the attributes of the alternative key:  Cf. the remark on page 5: If the semantical identifier consists of more than one attribute create a structure containing the attributes of the alternative key. Take care to use the same names and data types for the attributes as in the persistent structure. The name of the Alternative Key must be different of the names of the node attributes

 

For example, in my referenced BO I have a persistent structure which contains the following attributes:

 

KEY1 Type/BOBF/CONF_KEY
PARENT_KEY1 Type/BOBF/CONF_KEY
ROOT_KEY1 Type/BOBF/CONF_KEY
.INCLUDE1 TypeZZS_PERSON_D
PERSON_OBJID1 TypeHROBJID
PERSON_OTYPE1 TypeOTYPE
COMPANY_NAME1 TypeSTEXT

 

and a alternative key structure for the alternative key named "PERSON_ALT_KEY" containing:

 

PERSON_OBJID1 TypeHROBJID
PERSON_OTYPE1 TypeOTYPE

 

1. Is it possible to create this cross-BO association via binding?

 

     From the source code I'm not really sure, since the part of internal ticket 0000057141 2014, which should raise the exception, is commented:

Cross-BO assoc.PNG

 

 

2. Since the first option doesn't seem to work for me, I guess we have to implement this binding using an association class.  There, I can do a query_by_attributes on my referenced BO and retrieve the key. 

 

But...    My referenced BO is based on a DAC which uses a model class to retrieve the person (student / central person / etc) by alternative keys objid and otype;  and uses transient keys.  In a later phase, that transient key is used to access the referenced BO,  but then, the DAC / model of the referenced BO does no longer know this transient key.

 

What would be your recommendation in solving this issue? 

 

One solution could be to extend the model class, so that the singleton instance can also be retrieved by transient keys, by saving the transient keys in a static attribute.  Are there any alternatives?

 

Many thanks in advance!

 

Kind regards,

Bjorn

Delete Root

$
0
0

Hi experts

Im trying to delete a root :

 

    DATA: ls_sel_opt TYPE /bobf/s_frw_query_selparam,

          lt_sel_opt TYPE /bobf/t_frw_query_selparam.

 

 

    ls_sel_opt-attribute_name = /scmtms/if_tor_c=>sc_query_attribute-root-planning_attributes-tor_id.

    ls_sel_opt-sign  = 'I'.

    ls_sel_opt-option = 'EQ'.

    ls_sel_opt-low    = p_custid.

    ls_sel_opt-high  = ''.

    INSERT ls_sel_opt INTO TABLE lt_sel_opt.

 

    DATA lo_change        TYPE REF TO /bobf/if_tra_change.

    DATA lo_message        TYPE REF TO /bobf/if_frw_message.

    DATA lt_failed_key    TYPE /bobf/t_frw_key.

    DATA: lt_failed_act_key TYPE /bobf/t_frw_key,

          lo_srvmgr        TYPE REF TO /bobf/if_tra_service_manager.

    DATA: ls_parameters  TYPE /scmtms/tor_id,

          lr_s_parameters TYPE REF TO data,

          lx_frw          TYPE REF TO /bobf/cx_frw.

 

    DATA: lo_srv_mgr TYPE REF TO /bobf/if_tra_service_manager,

          lt_tor_key TYPE /bobf/t_frw_key.

* Get an instance of a service manager for e.g. BO TRQ

    lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).

 

 

* Query business object - KEY

    CALL METHOD lo_srv_mgr->query

      EXPORTING

        iv_query_key            = /scmtms/if_tor_c=>sc_query-root-planning_attributes

        it_selection_parameters = lt_sel_opt

      IMPORTING

        et_key                  = lt_tor_key.

 

*    CREATE DATA lr_s_parameters.

* Carry out check

*      lr_s_parameters->delete_root = 'X'.

 

    CALL METHOD lo_srv_mgr->do_action

      EXPORTING

        iv_act_key          = /scmtms/if_tor_c=>sc_action-root-delete_root

        it_key              = lt_tor_key

        is_parameters        = lr_s_parameters

      IMPORTING

        eo_change            = lo_change

        eo_message          = lo_message

        et_failed_key        = lt_failed_key

        et_failed_action_key = lt_failed_act_key.

 

 

 

is ocurring dump but i dont know why

could you helpme?

the dump is attached.

Dependencies between BOBF determination

$
0
0

Hello,

 

is it possible to implement an dependency like this?

 

Determination A has to be execute after Determination B was successful executed for a BO node.

 

Thank you

 

Christian

Transaction /BOBF/CONF_UI not available

$
0
0

Hi all

I am trying to use BOBF and follow the tutorials Introduction to Business Object Processing Framework (BOPF)

There is a sample /BOBF/DEMO_CUSTOMER, that SAP provide for demo usage and on the transaction /BOBF/CONF_UI, I should find /BOBF/DEMO_CUSTOMER object but I can't. When I try to call the transaction /BOBF/CONF_UI, it says me:

This function is not possible

Do I have to install some packages on my SAP-System?


Change item didnt´t work.

$
0
0

Hi experts.truck

I'm working in TM web dynpro aplication .In the process I mark 3 unit freight and  one truck then should be created 1 order freight with this 3 units.

caminhão.png

But after saved the order is created without the 3 units:

ca3.png

 

 

I need understand why isnt created.

 

CLEAR lt_mod.

 

   CALL METHOD /scmtms/cl_mod_helper=>mod_create_multi

     EXPORTING

       it_data = lt_fo_root

       iv_node = /scmtms/if_tor_c=>sc_node-root

     CHANGING

       ct_mod  = lt_mod.

 

   /scmtms/cl_mod_helper=>mod_create_multi(

     EXPORTING

       it_data        = lt_fo_item

       iv_node        = /scmtms/if_tor_c=>sc_node-item_tr

       iv_source_node = /scmtms/if_tor_c=>sc_node-root

       iv_association = /scmtms/if_tor_c=>sc_association-root-item_tr

     CHANGING

       ct_mod         = lt_mod ).

 

   /scmtms/cl_mod_helper=>mod_create_multi(

     EXPORTING

       it_data        = lt_fo_stop

       iv_node        = /scmtms/if_tor_c=>sc_node-stop

       iv_source_node = /scmtms/if_tor_c=>sc_node-root

       iv_association = /scmtms/if_tor_c=>sc_association-root-stop

     CHANGING

       ct_mod         = lt_mod ).

 

   /scmtms/cl_mod_helper=>mod_create_multi(

     EXPORTING

       it_data        = lt_fo_succ

       iv_node        = /scmtms/if_tor_c=>sc_node-stop_successor

       iv_source_node = /scmtms/if_tor_c=>sc_node-stop

       iv_association = /scmtms/if_tor_c=>sc_association-stop-stop_successor

       iv_do_sorting  = abap_true

     CHANGING

       ct_mod         = lt_mod ).

 

   /scmtms/cl_mod_helper=>mod_create_multi(

     EXPORTING

       it_data        = lt_fo_summary

       iv_node        = /scmtms/if_tor_c=>sc_node-summary

       iv_source_node = /scmtms/if_tor_c=>sc_node-root

       iv_association = /scmtms/if_tor_c=>sc_association-root-summary

     CHANGING

       ct_mod         = lt_mod ).

 

   CLEAR: lv_error.

 

   lo_fo_srvmgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).

 

   lo_fo_srvmgr->modify(

     EXPORTING

       it_modification = lt_mod

     IMPORTING

       eo_change = lo_change

       eo_message = lo_message ).

 

   IF lo_message IS BOUND .

     /scmtms/cl_common_helper=>msg_convert_bopf_2_bapiret2(

        EXPORTING

          io_message  = lo_message

        CHANGING

          ct_bapiret2 = lt_return[] ).

 

     lo_message->get_messages(

       EXPORTING

         iv_severity             'E'

       IMPORTING

         et_message              = lt_message ).

 

     IF lt_message IS NOT INITIAL.

       lv_error = 1.

     ENDIF.

   ENDIF.

 

 

 

All code is attached

thasnks

Don´t show items in NWBC.

$
0
0

Hi experts.

 

I created a program that create a order with items it worked and i can see my items in table but i cant see it in nwbc i can only see the header:

items.png

But i can see it in /n/bobf/test_ui transaction:

3.png

 

SOmebody know why occured it.?

Thanks.

Error handling transaction manager

$
0
0

Dear BOPF experts,

I want to develop an interface to create a mass of SAP TM Forwarding Orders.  

  

I learned that BOPF is designed to handle mass data. All validations, determinations, actions and so on have a table of keys as importing parameter to do something for a mass of data. 


I want to use this performance advantage in the interface. I want to pass the modify method of the service manager a package of forwarding orders to create them and call then the save method of the transaction manager. This seems to work fine, but I’m facing issues with the error handling. The transaction manager saves by default nothing if an error occurs during the consistence validation. 


I need another error handling:

When the service manager creates the nodes then errors can occur based on validations. In this case I want to protocol the errors and remove these corrupted forwarding orders from the transactional changes, but the correct forwarding orders shall be created. When I call the save method of the transaction manager then it executes the consistence validation again. If errors occur at this time then I want to save the correct forwarding orders, protocol the errors and discard the corrupt ones.


Is there a way to do this with BOPF, or do I have to create all forwarding orders one by one? 

  

Best regards 

Frank 

Integration of Media entity in SAP NW Gateway to BOBF Entities

$
0
0

Hi,

  Normally we can integrate any of the nodes created in BOBF Business Objects to any entities in the SAP NW Gateway. Can we do the same for

media entities in Gateway. In other words, say for example : I have a BO with 2 nodes : Root and attachment (DO) . Can I bind the attachment node to an entity in my gateway project ?

I tried this , but unfortunately I could not see the attachment in the netweaver gateway project.

Is there any idea on how to proceed in this case ?

 

 

Thanks

Gayathri

Triggering a second transaction

$
0
0

Hi experts,

 

Is there a way to trigger a second save transaction from within a determination?  We are facing a situation where, when saving to a BOPF table, another standard table has to be maintained. 

 

In a normal situation we can control the two updates via the BOPF commit, but because of some unfortunate circumstances, the standard table has to be updated via an RFC call.  This means that the update of the standard table is already committed before the BOPF commit has succeeded, leaving room for inconsistencies between the two tables. The user should receive an error message if any of the two updates failed.

The current idea is to work with a status variable in the BOPF node:

- transaction 1 = BOPF update + commit; status = update pending;  for changed made by user

- transaction 2 = standard table update + commit; status = active; via determination after load, for all records where status = update pending.

 

I could trigger the second save via the transaction manager instance from the FPM application controller, but the BOPF model should also work from outside the FPM application.

 

I'm aware that this approach is not optimal.  Any other strategies to tackle this problem are welcome

 

Thanks in advance!

 

Kind regards,

Bjorn

Viewing all 309 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>