cancel
Showing results for 
Search instead for 
Did you mean: 

Sybase sup populate dropdown list ( add choice ) from BAPI

Former Member
0 Kudos

Hi Experts ,

fr

if any one has reference or any sample to populate drop down list from BAPI , please share . i need to populate list of materials from the back end in order to generate Goods Issue Note .

Thanking you.........!

Best Regards,

Thushara

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

Thushara it is a straight forward process.

You can create a seperate MBO only to fetch the particular field or you can get that particular value from other MBO.

Before going to the screen containing drop down you need to perform the online request then only the drop down will be filled with dynamic data.

Former Member
0 Kudos

Hi Midhun,

i am halfway thorough according to the guides given above , there is small issue with a last statement . please explain me where i can perform online request ?

My MBO As follows ;

Workflow

Regards,

Thushara

midhun_vp
Active Contributor
0 Kudos

Lets say you need to populate a list of emp names .

The names are in an MBO.

So before going to the screen which contains the drop down list you need to perform the online request to this MBO.

Then only CDB will be filled and the application  can fetch the emp names.

There is no functionality for the dropdown list to perform online request.

Former Member
0 Kudos

Hi ,

let me get clear on this ..

you mean before i go to screen which drop down list consist i need to create another screen and put a menu item and in the menu item properties i need to select type and Online Request and then for default success screen i need to give screen which drop down list consist . is it /

i have done that way .but in the drop down list properties under dynamic value key and display name key its show Errorlog.errorlogMessage and Errorlog. errorlogmesageaslist

where i am went wrong ? pls assist

Regards,

Thushara

Former Member
0 Kudos

Hi Midhun,

Sorry i made small mistake and now its working fine  .thanks a lot ..

now i need to find the way to do something for that additional screen ..

Regards,

Thushara

midhun_vp
Active Contributor
0 Kudos

Ok Thushara.

Let me know if there is any doubts or post in the SCN by adding me in it.

Former Member
0 Kudos

Hi  Midhun,

Indeed i will . .Thanks a lot again for your support ..

Regards,

Thushara

david_brandow
Contributor
0 Kudos

For the record, you don't necessarily need to have an additional screen. You can always create a custom action for that online request and invoke it through custom code at an appropriate time, such as when the screen opens.

Former Member
0 Kudos

Hi Midhun,

Interesting , can you please give me clue about how to create custom action . i have gone through some articles and not able to find clear cut guide for this ..

Regards,

Thushara

Former Member
0 Kudos

Hi Midhun,

as per blogs and innocenter we can create custom action alone with a menu or button or another control .is there anyway to do this with out having action on any control such as button , menu item ?

Thanks ..

Regards,

Thushara

midhun_vp
Active Contributor
0 Kudos

Here you go.

Create a custom action with online request. ex: getorder

Generate mobile workflow.

Go to -workflow_jquerymobilelookandfeel.html find the funtion menuItemCallbackgetorder();

Copy the function add it in the custom.js file inside the method customBeforeShowScreen(screenToShow, screenToHide)

Ex:

if(screenToShow === "Details") {

                    menuItemCallbackgetorder();

                              return true;

                    }

Now whats happens is that before the screen opens the function will be called even without clicking the menu item.

I believe that this is the way David mentioned in his comment.

david_brandow
Contributor
0 Kudos

It depends on what version of SUP you are using.  If you are using a particularly old one, there are no custom actions and you'll need to create a regular menu item and then remove it dynamically at runtime so that it doesn't show up.  But if you have a relatively new version of SUP, there are custom actions which are similar to menu items, but have no corresponding UI, just the generated method in Workflow.js/HybridApp.js which you can then call from custom code.

Former Member
0 Kudos

Hi David ,

my SUP version is 2.1.0  .. how can i create custom action with the 2.1.0 version ..

i guess this is not a old version .. as per my knowledge 2.1.3 is the latest ..

Regards,

Thushara

midhun_vp
Active Contributor
0 Kudos

Since you are using verion 2.1.0 you cannot find a custom action in it.

So a quick solution is that, create a menu item (It will create a function similar to menuitem... as I mentioned in my earlier post) use the equivalent method generated in the custom.js.

And finally hide the menu item from the UI through the custom code in custom.js.

Former Member
0 Kudos

Hi Mithun,

I'm using SUP 2.2 for developing an Sale Order Creation HWC app. In one scenario, I have used an custom action menu button named Test with online request & deployed the workflow also. But after that, I couldnt see the function menuItemCallbackTest(); in the file workflow_jquerymobilelookandfeel.html.

I'm stuck now to proceed further. Kindly please help me out ASAP.

Midhun VP wrote:

Here you go.

Create a custom action with online request. ex: getorder

Generate mobile workflow.

Go to -workflow_jquerymobilelookandfeel.html find the funtion menuItemCallbackgetorder();

Copy the function add it in the custom.js file inside the method customBeforeShowScreen(screenToShow, screenToHide)

Ex:

if(screenToShow === "Details") {

                    menuItemCallbackgetorder();

                              return true;

                    }

Now whats happens is that before the screen opens the function will be called even without clicking the menu item.

I believe that this is the way David mentioned in his comment.

midhun_vp
Active Contributor
0 Kudos

Right click and generate the workflow then only you will find the method inside.

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

I already deployed the workflow but still couldnt able to figure out the Callbcak function in the workflow_jquerymobilelookandfeel.html file.

midhun_vp
Active Contributor
0 Kudos

The naming convention you are searching for it wrong,

function menuItemCallbackTest(); The right naming convention is menuItemCallbackPurchase_OrdersRefresh(); // purchase_orders is the screen name. You missed the screen name and searching got it.

Search for Test and find what is the function name.

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

I got your point & tried the same but still no hope..


The custom action I used is Testing in the screen Header Details & I deployed the same also.

And now I searched for the function menuCallBackHeader_DetailsTesting() in the workflow_jquerymobilelookandfeel.html file. But still I couldnt able to figure out that function.

Where I went wrong?? Pls Advice ASAP.

Former Member
0 Kudos

Hi Midhun,

I got the output finally

Thanks for your support, hope it continues in days to come too.

Correct Solution :

Actually the function which you were saying was present in the Workflow.js and not in the

workflow_jquerymobilelookandfeel.html file. So, I copied the same & deployed & got the output also.

Thanks Again!!


Regards

-Ela.


Answers (1)

Answers (1)

MariusStoica
Active Participant
0 Kudos

Hi Thushara, Hi Midhun,

I'm using SUP 2.1.2 and I need to populate a dropdown with some details for a material, in the same screen as the the material. Do you have any idea on how to do this (my difficulty being doing it in the same screen as the material)? Or link to such an example code ...

Thank you,

Marius

midhun_vp
Active Contributor
0 Kudos

Please open a new post  ( tag me ) with complete details on the issue you are facing, hence I can help you better.

I don't understand " I need to populate a dropdown with some details for a material, in the same screen as the the material. "

- Midhun VP

MariusStoica
Active Participant
0 Kudos

I've opened a new discussion here http://scn.sap.com/message/14227574