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

Mandatory value for action not found

$
0
0

When implementing a new action in the BOPF layer and consuming it via smart templates (OData service) with dataActtion attribute in the CDS annotation,I get the following error:

 

Error.PNG

 

What can be the possible issue?


Create new Freight order through Freight unit

$
0
0

Hi ,

 

In BOPF using OPTIMIZE action in  /SCMTMS/TOR object  I have to create the Freight Order using multiple Freight Units having the same stages but FO is not created and not populating any errors.

In this FU's are not planned , Here is the sample code I wrote to create the FO

 

   lo_srv_mgr          TYPE REF TO /bobf/if_tra_service_manager,      " Containing the public service methods of a service manager

&---------------------------------------------------------------------*
* Get an instance of a service manager for FO
*&---------------------------------------------------------------------*
lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).

 

 

 

  CALL METHOD

lo_srv_mgr->do_action
EXPORTING
iv_act_key           = /scmtms/if_tor_c=>sc_action-root-optimize
it_key               = lt_key_fu
*    is_parameters        =
IMPORTING
eo_change            = lo_change
eo_message           = lo_msg
et_failed_key        = lt_failed_key
et_failed_action_key = lt_failed_act_key
.

IF lo_msg IS BOUND .
/scmtms/cl_common_helper=>msg_convert_bopf_2_bapiret2(
EXPORTING
io_message  = lo_msg
CHANGING
ct_bapiret2 = lt_bapiret2  ).
endif.

*&---------------------------------------------------------*
* Save the changes on the Freight Order/Freight bookings..
*&---------------------------------------------------------*
lo_tra->save( IMPORTING  eo_message = lo_msg ).
IF lo_msg IS BOUND .
/scmtms/cl_common_helper=>msg_convert_bopf_2_bapiret2(
EXPORTING
io_message  = lo_msg
CHANGING
ct_bapiret2 = lt_bapiret2  ).
endif.

 

 

Please suggest an alternative  if it doesn't work this way.

 

Thanks

Arun

How to debug the Standard Query ( Select_all ) in BOPF???

$
0
0

How to debug the Standard Query ( Select_all ) in BOPF???

is there any possible ways other than performing association to parent multiple time, to directly traverse to upper level node from lower node?

$
0
0

Hi Experts ,

 

 

is there any possible ways to directly traverse to upper level node from lower node other than performing to_parent multiple time for each level? please refer the following pic for my doubt.Untitled.png

BOPF Code value check

$
0
0

Hello Colleagues,

 

I have implemented class /BOFU/CL_V_CODE_VALUES like described in this blog: http://scn.sap.com/community/abap/bopf/blog/2013/10/04/bopf-code-values-check#comment-644522

 

This works fine if the Domain has a check table or a check value. If I use a value range I get errors on all inputs.

 

I have domain "WORK_DAYS_YEAR" for storing the work days  a year can have. The Domain is a DEC(3). The possible value would be 0 and 366.

I have implemented the check class but I always get an error that my value is wrong no matter what I input.


Any idea on this?

 

Many thanks

 

Best regards

 

Roman

Determinations and Timepoints

$
0
0

Hello Colleagues,

 

if I create a determination on ROOT_TEXT (Structure /BOFU/S_SHORT_TEXT) and I add a class to set the upper case text field it works fine. I am not sure about the Evaluation Timepoints. If I set it to "During Save (Before Writing Data)" I get an "Determination pattern not supported" error. If I set it to "Before Save (Finalize)" I don´t get the error.

 

What is the difference of these two timepoints and which one would be the correct one in my case.

 

The examples in BOPF always use "During Save (Before Writing Data)" but have the same error at check I have.

 

Any glue for this?

 

Thanks for your answers.

 

Best regards

 

Roman

BOPF - Adding F4 help for a custom field in Incident management

$
0
0

Hi All,

 

In our requirement , we have added custom fields multiple nodes like basic info, person injury, etc.

Incident creation uses GAF FPM. Incident display/change uses OIF FPM.

 

Our initial requirement was to have dropdown boxes for the custom fields, which works well with GAF as it displays the description of value.

However, in OIF the dropdowns only show the value and not the description. So we decided to stick with INPUT FIELD instead of DROPDOWN  .

For standard fields like PLANT , the plant description gets loaded on the screen as it is used as an element in the Melting Group.

I am trying to do the same with my custom fields but not having a clue like how it gets loaded from the UIBB.

I have added the descrption field as text view in the melting group similar to the standard fields.

 

While debugging the feeder class for plant field, the system was populating the value in runtime from the UIBB to the class for the standard field description but not in the case of custom field..

 

Help would be greatly appreciated as i have to implement this for 14 fields.

 

I have attached a file with screenshots , which explains the standard scenario and the custom scenario.

I am not sure if it has something to do with the search help.

 

thanks in advance.

BOPF enhancment - Steps to delete an enhancement - Incident management

$
0
0

Hi All,

 

Can anyone guide on how to delete and enhancement of a BOPF object.

 

We  are currently working on Incident management. As part of our requirement we need an additional Tab "Claims" during incident creation.

At BO level the object EHHSS_INCIDENT had to be enhanced to add a subnode CLAIMS. This new object's name is Z_TEST_CLAIMS whose super business object is EHHSS_INCIDENT.


Is it possible to delete this enhancement object. While trying to delete this object it gives a message "

Can be deleted only if all its entities are deleted"


Can anyone help me with this as we have to remove this enhanced object for the time being....




How to get BOBF Texts for T100 messages?

$
0
0

Hi All,

 

for my T100 Message APOC_OR_UI_MESSAGES with number 051 (Action "&1" is not available for the current item status "&2") I would like to reuse the action texts in BOBF. Could you tell me an API or DB-Table to fetch that texts?

Best regards

Christof

unable to fetch data of BOPF from Odata service

$
0
0

Hello,

 

I have created the bopf object: ztest.

I created odata service and redefined the odata model with bopf.

/bofu/gui_cust table entry is

client: 100, service name: ztest1_srv, service version: 1, model name: ztest1_mdl, version:1, bo : ztest, default query: select_all.

 

If i try to overwrite the data model of odata service, it will create new entry in /bopf/gbi_cust table.

 

when i generate the odata service and run my service in /iwfnd/gw_client.

service url:  /sap/opu/odata/SAP/ZTEST1_SRV;v=0002/ROOTCollection.

 

question: 1. why the service url is appended wiht ;v=0002 is added in the url.

how to make it work without version value appended?

2. did i do any mistake while creating the odata service?

3. while creating i got the service name: ztest1_1_srv.

Can somebody help me in creating step by step procedure to create odata service with screenshots in $tmp package?

I have created almost 3 t 4, but still i am not getting.

If i remove the version, i cant access the odata service. 403 forbidden error.No service found for namespace , name ZTEST1_SRV, version 0001.

 

please help me with this.

Also, my UI need to access data like tree table,

node1->node2->node3 in stepwise node1 is root node.

 

how to query this way from ui or rest client?

Rootnode("ABC")/Pages("xyz")/list("123").

Wrong call of CALL FUNCTION 'NUMBER_GET_INFO' in /BOFU/CL_D_DRAW_NUMBER

$
0
0

Hello Colleagues,

 

I wonder a bit of what I see in /BOBF/IF_FRW_DETERMINATION~EXECUTE (/BOFU/CL_D_DRAW_NUMBER). There is a CALL FUNCTION 'NUMBER_GET_INFO' with attribute mv_subobject. The attribute mv_subobject is defined as boolean in the class but SAP function module expects the name if the subobject in number range there. The value is not a boolean it is a CHAR(6) value.

 

I think this implementation is wrong.

 

Check line 152 ff in /BOBF/IF_FRW_DETERMINATION~EXECUTE.

 

Can someone confirm my thoughts? Can someone at SAP fix this if it is a bug?

 

Thanks

 

Best regards

 

Roman

How to create subnode entries with an action

$
0
0

Hello Colleagues,

 

maybe someone can help me out. I have this structure:

 

ROOT

     - ROOT_TEXT

 

I have an action to import data for ROOT and ROOT_TEXT at one instance. Updating the ROOT node with the imported data was "easy" but now I must create multiple new records at ROOT_TEXT at the same time. I think I must use io_modify->create but how can I get the right keys and connect the ROOT with the ROOT_TEXT.

 

Maybe someone can give me a hint or has an example for better understanding how to use.

 

Many thanks

 

Roman

/BOBF/IF_FRW_CHANGE~GET_CHANGES: precise Meaning of IV_FAILED

$
0
0

Hi,

I have tried to understand /BOBF/CL_FRW_CHANGE... .

 

ABAP Doc says abaout parameter iv_failed:

If true, the result of the method will also contain change information of modifications that have been failed and are thus not executed.

 

Is it correct that both kind of keys are given when this flag is set: failed AND succeeded keys? Or only failed keys?

 

We want to consider only the failed ones. Does it mean we have to do the subtraction for ourselves?

 

Regards, Jürgen

Query does not works

$
0
0

Hi Experts,

 

I got a problem in the Query  /scmtms/if_tor_c=>sc_query-root-planning_attributes when execute in Background.

 

If I execute Online it´s working but in Background task, not works.

 

I am calling the Query from SUBMIT, below a example:

 

SUBMIT z_program WITH s_option EQ imp_variable SIGN 'I' AND RETURN


I already tested imputing the SUBMIT inside the Function module but does not work too.


.Could you help me?


Regards.

Wellington Oliveira.

TechEd 2013: Agile custom development with BOPF

$
0
0

I was honored to be invited as speaker at TechEd 2013 in Barcelona.

While I was overwhelmed by the number of attendants and positive acclaim, I noticed that I never published the slides nor the recording.

The reason is quite simple: I did not want to publish it on slideshare or youtube since I wanted to have it on a platform owned by SAP.

However, I cannot attach neither a PDF nor the mp4-recording (115MB) to this document.

I even converted all slides into a single PNG-file (as this was an allowed format, though it looks really funny), but the file size it too big... Any advice?


setting dynamic field control in bopf

$
0
0

I want to control some fields whether editable or not by setting dynamic field control.

my solution as below:

1. check the field whether editable or not on some logical process and return checked result.

2. set the field control value of field(e.g. glaccount -> f_glaccount) by checked result.

3. implement the code at get_entity, get_entityset, execute_action, changeset_process method.

 

so, I have to implement the code at 4 methods. I think it's not good solution although it work.

 

anybody can help me to give a better solution.

thank you very much.

Cross-BO Aggregations/Compositions

$
0
0

Hello,

 

we have BOs Alice & Bob.

 

Alice shall contain an aggregation of multiple Bobs. Therefore we integrated Bob via an Representation-Node into Alice.

Bob's ROOT has a field ALICE_KEY that links to Alice.

So we want the association Alice-TO_BOB to be a 1:N target-resolving cross-BO association that is based on Bob's ALICE_KEY.

 

Is it even possible to model this scenario in BOBF?

 

What we tried so far:

  • Association Class /BOBF/CL_LIB_C_CROSS_BO together with "Cross-BO Binding Hint"
    Does only work for source-resolving associations, therefore strictly 1:1 (?).
    When used with target-resolving association-configuration, it just CONTINUEs instead of a proper assert.... oh my...
    Furthermore, internally there is an (FAULTY) assertions that checks the ASSOC_CAT against an Assoc-*BINDING*-Cat. This check must fail all the time but no one notices because of these castrated/disabled/optional crap assertions

  • Using the "Cross-BO Binding" one is only allowed to select KEY of the target-BO (we would want to select Bob's ALICE_KEY), so no luck either

 

The only solution we can think of by now, is a dedicated Alice-node in Alice for every Bob:

Alice / LINK_TO_BOB_NODE / BOB_REPRESENTATION_NODE

where LINK_TO_BOB_NODE has a field BOB_KEY and its association TO_BOB_REPRESENTATION_NODE is a source-resolving assocation with BOB-KEY as target and BOB_KEY as source.....

 

Any advice much appreciated.

How to use the tree UIBB (FBI Feeder class)

$
0
0

Hi experts,

 

Is it possible to use the FPM_TREE_UIBB component to display a BO's nodes and subnodes as a hierarchical list?

 

I've tried as described below: http://help.sap.com/saphelp_tm90/helpdata/ru/a5/a8171815a6433c8180fb3a95e49def/content.htm?frameset=/ru/39/edbb0ef1644bc4926422da4f6a0b29/frameset.htm&current_toc=/ru/c3/3f78b9e4044bd1b38246f0a7993c42/plain.htm&node_id=34

 

But, in the MAP_DATA_BO_NODE_TO_UI method of the mapper class, we only receive the entries of the node defined in the tree's FBI view, derived from the wiremodel.  I also tried with adding an associated view to the FBI view, but this only gives the information of one subnode, available as an extra column of the tree rather than a sub layer in the hierarchy.

 

Does this mean the FBI tree UIBB cannot work with multiple node's, but I have to define a custom 'parent_key' in order to create a hierarchy within the data of one single node of the BO?

 

Thanks for your advice!

 

KR,

Bjorn

Processing mode of BOPF BO

$
0
0

Hello,

 

by calling methode RETRIEVE of the BOPF service manager one can read the data of a node and also specify the processing mode via parameter IV_EDIT_MODE, domain /BOPF/CONF_EDIT_MODE. I always use 02 -> exclusive write,

 

I would like to request the processing mode at some other point of time, i.e. determine whether the object is in read only or edit mode, but couldn't find any suitable methods.

Any idea how this could be achieved?

 

Thx and regards,

Ulli

unable to fetch data of BOPF from Odata service

$
0
0

Hello,

 

I have created the bopf object: ztest.

I created odata service and redefined the odata model with bopf.

/bofu/gui_cust table entry is

client: 100, service name: ztest1_srv, service version: 1, model name: ztest1_mdl, version:1, bo : ztest, default query: select_all.

 

If i try to overwrite the data model of odata service, it will create new entry in /bopf/gbi_cust table.

 

when i generate the odata service and run my service in /iwfnd/gw_client.

service url:  /sap/opu/odata/SAP/ZTEST1_SRV;v=0002/ROOTCollection.

 

question: 1. why the service url is appended wiht ;v=0002 is added in the url.

how to make it work without version value appended?

2. did i do any mistake while creating the odata service?

3. while creating i got the service name: ztest1_1_srv.

Can somebody help me in creating step by step procedure to create odata service with screenshots in $tmp package?

I have created almost 3 t 4, but still i am not getting.

If i remove the version, i cant access the odata service. 403 forbidden error.No service found for namespace , name ZTEST1_SRV, version 0001.

 

please help me with this.

Also, my UI need to access data like tree table,

node1->node2->node3 in stepwise node1 is root node.

 

how to query this way from ui or rest client?

Rootnode("ABC")/Pages("xyz")/list("123").

Viewing all 309 articles
Browse latest View live


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