Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP DEVELOMENT

0 Kudos

How we can pass the the multiple input values to function module??

20 REPLIES 20

VXLozano
Active Contributor

what did you tried until now? what's your goal? what's your code?

how many time have you spend trying? and searching the web or sap.com for hints?

Sandra_Rossi
Active Contributor
0 Kudos

Not inspired by an adequate title? 🙂

basantmhr
Participant
0 Kudos

Hi Jotiba,

It will be clear from the Function Module definition( Importing parameter ), if it takes multiple input values then it must be asking for importing those values via a table type or else you loop and call the function module for the number of values you have one by one.

PS: Function Module will have a clear definition of importing, exporting parameters. Please check that!

0 Kudos

Sir can you please explain this with small example

0 Kudos

Can you provide me the name of the function module which you are actually using, if possible then I will try to explain with that only!

0 Kudos

TMS_MGR_READ_TRASPORT_REQUEST ITS A function module where I want to pass TRKORR from table e070 . The TRKORR is declared as selct-option:

TRKORR FOR E070-TRKORR

By your question revision, I got the Function Module you are talking about. Interestingly the function module takes a single TR number as input as well as a set of TR numbers in the form of a table as input. You can call the Function Module like provided below.

DATA: lt_tms_request_headers TYPE stms_tr_requests,
      ls_tms_request_header  TYPE stms_tr_request,
      lt_tms_requests        TYPE stms_wbo_requests.

TABLES e070.
SELECT-OPTIONS: so_tr FOR e070-trkorr.
IF so_tr IS NOT INITIAL.
  LOOP AT so_tr.
    ls_tms_request_header-trkorr = so_tr-low.
    APPEND ls_tms_request_header TO lt_tms_request_headers.
    CLEAR ls_tms_request_header.
  ENDLOOP.

  CALL FUNCTION 'TMS_MGR_READ_TRANSPORT_REQUEST'
    EXPORTING
      iv_request       = 'SOME'
      it_requests      = lt_tms_request_headers
    IMPORTING
      et_request_infos = lt_tms_requests
    EXCEPTIONS
      OTHERS           = 1.

ENDIF.

Also, I have no idea as to why iv_request is taking 'SOME' as input, most probably it is being passed to satisfy the required condition of the importing parameter.

0 Kudos

Thank you so much sir

I have added a full working code for getting info from the function module provided, you can check and use the same.

matt
Active Contributor

Asking for an upvote is probably not a good idea. You're already at -1.

Yes, Sir Matthew Billingham, I have removed the said part.

0 Kudos

Hello sir

The above code is only fetching the output for low and high level request

And giving output for those field only but I need to display all the active within that low and high range so can please tell me what modification should I do in the above program??

0 Kudos

For that you will have to fetch the TR numbers between the low and high values from table e070, then loop at the entry and use the above code. This table will give you both a high-level TR number and task number also, fetch it according to your need.

0 Kudos

sir can show me with that above example

0 Kudos

jotiba If you say that your own code doesn't work as you expect, please show your code, otherwise we can't tell what you did wrong, and you can't get any assistance. I hope you understand that.

VXLozano
Active Contributor

sandra.rossi I can tell you what he did wrong: he did not put any kind of effort when ellaborating the question. He did not updated the question when things became a bit more clear (now we know what he is trying, which function is calling, and why it is not working). He showed no respect for any of us, and he made no effort to solve his problem, just asked for any other one to do it for him.
The most sad thing is someone did.

And even then, he did not tried enough.

jotiba if you update your question and put all the information we could get from this "answer", we'll help you. No true code will be provided (at least from me), but nice hints and maybe even a good algorythm. Maybe.

But I will not waste my time trying to help you until you show us a bit of respect by putting effort in your question.

Good luck.

matt
Active Contributor

basant.singh Down vote removed. 🙂

0 Kudos

vicen.lozano Please don't over-interpret, there may be other reasons. Just pass your way if you are ignored. Just tell Jotiba that people won't help if there's no effort made on his/her side, or that you feel bad about your questions being ignored. And I don't want the person to give advice to everybody, I'm often faulty 😉

VXLozano
Active Contributor

I'm sorry, Sandra, but I keep my point. The OP has showed no effort in the post. And this "answer" has enough information to solve his problem.

He has been asked few times to improve the question, he did not. Maybe it's basically he doesn't understand those "claims", but again, when I ask a question, I try actively to be the one with most effort put on the thread: I put all the information I have (or I am asked for), I follow the question and try to reply to all the comments/answers, and so on.

The original post (including the subject) is useless. It remains useless. And if it will remain useless when it'll be closed of forgotten, people with the same "problem" will not be able to find a solution, and all the work people will put in this thread will be wasted.

This is not the goal of the sharing sites. It's not the way they must be.

0 Kudos

I simply hope jotiba can understand that he/she'll more benefit from the Community by sharing more information and answering people in the next questions.