cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.1.2 Issues

MariusStoica
Active Participant
0 Kudos

I'm new o SUP and I'mt trying to create a application to learn something

I read lots of posts and examples and "how to"'s but I got to a point where I need some expert advice or explanation

Here is my example:

I created a bapi in my backend system (only reads the materials –par_matnr, by the movement numbers - par_miscari = bwart and data):

*"  IMPORTING
*"     VALUE(PAR_MATNR) TYPE  ZBAPI_SUP_IMPORT-PAR_MATNR
*"     VALUE(PAR_DATA_LOW) TYPE  ZBAPI_SUP_IMPORT-PAR_DATA_LOW DEFAULT 19000101
*"     VALUE(PAR_DATA_HIGH) TYPE  ZBAPI_SUP_IMPORT-PAR_DATA_HIGH DEFAULT SY-DATUM
*"     VALUE(PAR_MISCARI) TYPE  ZBAPI_SUP_IMPORT-PAR_MISCARI OPTIONAL
*"  EXPORTING
*"     VALUE(RETURN) TYPE  BAPIRETURN
*"  TABLES
*"      PAR_MATNR_DATA STRUCTURE  ZBAPI_SUP_TABLE

Here are my 3 issues:

  1. In my MBO's start screen I need to use multiple parameters to send to the MBO. In the examples I've seen they all use only one parameter and only 1 personalization key. In debugger I only saw 1 value passed o the backend system even if I have values for both parameters. Can you shade some light?
  2. I need to create some custom Error screens but I didn' find a "how to". In the MBO, I've generated a "standard" error screen for the list and 1 for details but these need to be customized.

The issue here is

  1. The code can only be done in JAVA ? Can't I do something in backend system and only pass it to the error screen ?
  2. I have the return table and the PAR_MATNR_DATA table as export parameters. I've checked both tables as "output" parameters in the creation of the MBO, but that created a concatenation of fields (i.e. I have the fields from both tables as output fields). I need a logic in the backend system ? Can I use only 1 structure and send either the list of values or the error messages?
  3. The above logic is for the Jco but I want to create this also for GW use. I tried to create a backend service after some examples I found on SCN. I've atached one: [Content Deleted Jan 2014]

My problem is when I want to modify the code . The service simply doesn't work. I get a HTTP 500 error, even if the original code creates a usable service. How can I find the problem ?


Thank you

Message was edited by: Jason Lax

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

1. In my MBO's start screen I need to use multiple parameters to send to the MBO. In the examples I've seen they all use only one parameter and only 1 personalization key. In debugger I only saw 1 value passed o the backend system even if I have values for both parameters. Can you shade some light?

It is possible to pass multiple values as input to the MBO. How many input parameters are there for your MBO? Let's say 3, create 3 personalization keys and pass it as load parameters of the MBO. Then assign those values when you are making an online request from the HWC application. It will work.

2. I need to create some custom Error screens but I didn' find a "how to". In the MBO, I've generated a "standard" error screen for the list and 1 for details but these need to be customized.

All customizations are done through writing custom code inside the file custom.js. The HWC application is based on HTML and JavaScript.

A good example is here: http://scn.sap.com/community/mobile/blog/2013/02/20/develop-hwc-app-with-customized-list

- Midhun VP


Answers (3)

Answers (3)

MariusStoica
Active Participant
0 Kudos

Hi guru's,

The point 2.c it's still unanswered. I still have an issue that I cna't resolve.

Thank you,

Marius

david_brandow
Contributor
0 Kudos

I'm a little confused - are you trying to access the same backend using both MBO and OData?  If so, why?

There should be plenty of samples and documentation and threads for how to access OData.  Are you using datajs?

MariusStoica
Active Participant
0 Kudos

I started with the MBO to create the application and to test it, but then the client needed to use the GW server, ergo the need for OData appeared.

midhun_vp
Active Contributor
0 Kudos

If you are going to use OData then there is no need to create MBOs.

In the case of Odata there will not be any development in SUP. In SUP we will be configuring the proxy URL.

- Midhun VP

DoanManhQuynh
Active Contributor
0 Kudos

Hi Marius Stoica.

1. You can create as much as you need personalization keys to transfer data between device and SUP and bind to load parameters of the MBO (as Midhun said).

2.a: HWC make you have not coding then ofcause I think there is no "standard" way to customize Error screens. you could customize custom.js file, look at this link about custom UI for container apps:

: http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/f0118416-5062-2e10-9e93-8cca742da350

or you could define mbo contain error and make it one screens in your flow.

2.b: I dont know why but when you define EXPORTING and TABLE in the same time, attributes of export table alway contain attributes (and export value too) of export structure too. you can just delete these attribute or you should define all export as table or structure, i think so.

2.c: no ideal

Thanks and regard.

MariusStoica
Active Participant
0 Kudos

Anyone? Some ideas? Something that I haven't tried yet ? Or read?

Thank you