Skip to Content
Author's profile photo Otto Gold

Crowdsourcing of the navigation into SAP transactions

One of the features that I like to do to make my applications more user friendly and I dare to say that users of my applications think the same to large extent… is the quick navigation between my custom development and the SAP standard transactions. Of course SAP standard tools cannot navigate to my custom development (changing SAP standard code is not an option for me), but that does not prevent me from making the work flow, data flow and business process flow fluent and very user friendly from my side.

Most of the custom development pieces that I can see around me are anyway reports and UI / functionality aggregating cockpits. These two types of custom development are even more powerful when you can double-click everything you see and you’re taken to the SAP standard maintenance transaction for master data etc.

Because of all these reasons plus the fact that I am just one little mortal and SAP is huge and the SAP functionality is the same for everyone, it makes perfect sense to collect the information about how to make jumps to the most used transactions and share that with everyone for the benefit of everyone. I plan to start small with the navigation possibilities that I can find in my recent notes and improve this text over time if you, dear readers, can share your code for navigation with me.

My proposal is not a rocket science – a decent developer can find a suitable function or copy the CALL TRANSACTION (with some parameters typically) in 20 seconds (not always, read further about the “Challenge” section). What I want to do here is to create a list that will spare the developers those five minutes and will encourage the use of stable interfaces at the same time. Last but not least I want to empower the business user and application consultants that don’t know how easy or difficult it is to implement these super-user-friendly on-clicks in ABAP with something they can mail to their developers and ask them to add that to their programs in a minute.

I have never been a good wiki gardener and the “openness” of the wikis for everyone does not appeal to me either, so please add comments or direct_message me if you have navigation possibilities that you want to share with the team. If you have other ideas or remarks, feel free to share whatever you have, I welcome that.

An example what is especially welcome could be notes on security -> which navigation possibilities check the authorizations of the user and which perform the jump technically without protecting the jump (many of the examples below set some parameters and then start a transaction, that is a low brainer, but we will find some tricky cases as well). Another example could be that there is a function module that one should use for the navigation instead of some code snippets copied from SCN. Stable interfaces are always the best option if such interfaces exist.

Let’s also maintain a “Challenge” section. If you need to navigate to a certain transaction / screen / tool and you find it tricky and can’t find a way yourself, post it as a comment. I will then add it to the “Challenge” section and we will see if we have enough nut crackers (aka “nuts”) to find out how to do it for you. As the examples I am maintaining below to start the work rolling are not particularly difficult, I can imagine the “Challenge” section will be more fun than using SE93 with WHERE-USED list.

KS03 Display Cost Center

Consider function module K_COSTCENTER_SHOW.

KE53 Display Profit Center

Consider function module PCA_MASS_DISPLAY_OBJECT.

FB03 Display Document

Consider function module FI_DOCUMENT_DISPLAY_RFC.

XD03 Customer Display

Consider function module BAPI_CUSTOMER_DISPLAY.

XK03 Vendor Display

Consider function module BAPI_VENDOR_DISPLAY.

MM03 Display Material

Consider function module BAPI_MATERIAL_DISPLAY.

CN23, KO03 Controlling Order Display

Consider function module K_ORDER_DISPLAY.

ME23N Display Purchase Order

Consider function module ME_DISPLAY_PURCHASE_DOCUMENT.

ME53N Display Purchase Requisition

Consider function module MMPUR_REQUISITION_DISPLAY.

MIGO Goods Movement

Consider function module MIGO_DIALOG.

(Generic + Powerful) Show BOR Repository objects

Consider RSESHOWOBJECT program in combination with SWO1 – BOR Repository. Credits: Shai Sinai. Thanks a lot!

SE11 Data dictionary and development objects

For example RS_DD_SHOW function, but generally RS*SHOW or RS*DISPLAY function modules.

SE10 Development objects (like double-click in SE10 transaction)

Consider function TR_OBJECT_JUMP_TO_TOOL (use TADIR table key as the input)

Workflow related objects

CL_SWF_RDG_DISPATCHER=>EXECUTE_DIALOG_REQUEST_MULTI. Credits: Yuvaraj S. Thanks a lot!

Challenge section

No challenges yet. You’re welcome to challenge us…

Long term challenge: replace the proposed functions above with their released equivalents.

Credits: All the ladies and gentleman who joined the discussion below. I will not copy all the names here but it is the very nature of this article to collect valuable pieces of knowledge from our “SCN team” members and they receive all the credit. Thank you all!

Assigned Tags

      21 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Matthew Billingham
      Matthew Billingham

      I'd like to know if it's possible to jump to standard (web-enabled) SAP transactions from a web dynpro. You can jump to another web dynpro app (possible a SAP one), by coding the URL properly - but a SAP Gui one?

      I think it might be possible, since I vaguely recall seeing Solman behave this way. But I can't figure out how.

      Anyway - yes. Since I began doing SAP stuff, I've always tried to include this kind of integration. I remember once being asked to write something to download the data of a report. I was then given a second task to upload the downloaded data into a selection screen selection...Since both the report that was to be modified to download the data and the one that was to upload were custom, I suggested maybe just having a hotspot to go from one to the other.

      Oh, says the highly paid <insert consultancy name here> consultant. Can you do that? πŸ™‚

      Author's profile photo Joao Sousa
      Joao Sousa

      You can do it in a popup, which is good for showing documents. I never did it inplace.

      Call SAP Tcode using Webdynpro for ABAP &amp;laquo; SAP Ignite

      Author's profile photo Former Member
      Former Member

      Without any hard coding NWBC supports this out of the box, both GUI versions.

      Author's profile photo Otto Gold
      Otto Gold
      Blog Post Author

      Hi Matt,

      I am curious.. is the link provided by Joao the thing you wanted? I can't recognize that and am currently too lazy to go check myself πŸ™‚

      See you around.

      cheers Otto

      Author's profile photo Vinod Kumar
      Vinod Kumar

      Hi Otto,

      Thanks for the blog.  I used the same method (mentioned by Joao) for few WDA applications, where the requirement is to navigate to standard SAP GUI transaction codes.

      As I mentioned earlier, In one of the WDA applications, user requirement was to navigate to Material document (Transcation code : MIGO/MMPURPAMIGO) from the ALV list.  I created a "LinktoURL" column in ALV grid and assigned below URL value to its "reference" Property.

      CALL FUNCTION 'TH_GET_VIRT_HOST_DATA'

            EXPORTING

              protocol       = 0

              virt_idx       = 0

            IMPORTING

              hostname       = lv_host

              port                = lv_port

            EXCEPTIONS

              not_found      = 1

              internal_error = 2

              OTHERS         = 3.

      CONCATENATE 'http://'

                                  lv_host

                                  ':'

                                  lv_port

                                  '/sap/bc/gui/sap/its/webgui?~transaction=MMPURPAMIGO '

                                  '%20P_MBLNR=' ls_open_po-mblnr

                                  '&%20P_MJAHR=' ls_open_po-mjahr

                                  '&%20~okcode=ONLI' INTO ls_open_po-mblnr_url.

      Regards,

      Vinod

      Author's profile photo Former Member
      Former Member

      I would myself rather use method GET_URL of ABAP class CL_ITS_RUNTIME.

      Author's profile photo Matthew Billingham
      Matthew Billingham

      It looks promising. I'll play with it when I have some time...

      Author's profile photo Former Member
      Former Member

      FM K_COSTCENTER_SHOW looks good for KS03.

      Author's profile photo Former Member
      Former Member

      For KE53, FM PCA_MASS_DISPLAY_OBJECT can be used by passing KEY = <profit_center>.

      Author's profile photo Otto Gold
      Otto Gold
      Blog Post Author

      Thanks. Appreciated. Blog updated.

      Author's profile photo Former Member
      Former Member

      Unfortunately, all these FM's are not released to customer . Rough way of finding such FM is to search in TFDIR table for *DISP* , *SHOW* or *DIALOG* ( Example- MIGO_DIALOG). Step 2-  From the filtered list search for the keyword.

      In my last project, our client had implemented lot of such cockpit programs. In one of the programs, the menu painter's function got exhausted There is some limitation on maximum number of function codes that a screen or program can have . We had to replace some standard fcodes to get around this problem. Do you know how to add/ extend functionalities when the menu painter's fcode gets exhausted.

      Author's profile photo Otto Gold
      Otto Gold
      Blog Post Author

      Hello.

      Correct. But if you only use things released for customers, you don't get very far IMO. One must check the where-used lists of those functions and take the best guess. Or have you found a way how to help SAP understand that BAPI-type equivalent APIs should be provided for every screen and transaction in the system? πŸ™‚

      Just saying πŸ™‚

      cheers Otto

      p.s.: If the information in this blog becomes obsolete one day, because the not-so-released functions are not available any more (for whatever reason), I dare to say it is a good thing that we have a list where we can make everyone aware of that --> that would be here. If you can provide released equivalents to the functions above, I would appreciate it a lot!

      Author's profile photo Former Member
      Former Member

      Thanks for the initiative .I believe the whole community is going to benefit from it.

      There are lot of things which don't fall under SAP best practice like using BDC, FAE, unreleased FM's. We still use it as we don't have any other alternative. If you are hurt by my comments ,  I apologize for that.  Honestly speaking, I just wanted to point out that these FM's are unreleased. Enjoy the Easter holidays.

      P.S - >You didn't update the FM I mentioned for displaying MIGO -> MIGO_DIALOG.

      Check the usage in program RM07DOCS(Transaction MB51 ).

      Author's profile photo Otto Gold
      Otto Gold
      Blog Post Author

      I didn't mean to argue. We don't have to agree on everything but I still appreciate your time to pop by, leave a valuable comment and engage in the discussion. I didn't mean to skip your proposal - I overlooked it while talking to the family using the second half of the brain πŸ™‚ I didn't mean to be grumpy of anything, please don't apologize. It is probably me who should offer an apology if it came over that way. Happy Easter holidays and forgive me.

      See you around!

      cheers Otto

      Author's profile photo Joao Sousa
      Joao Sousa

      Correct. But if you only use things released for customers, you don't get very far IMO.

      More and more I find BAPI's for what I want, and if there is no BAPI I use batch-input.

      Using non-released FM means no support from SAP, no documentation, it's little better then changing SAP standard.

      Not to mention that when using non-released FM you can actually be doing direct INSERT, UPDATE into the database, because you are not using the entire code of the program and it's validations.

      Author's profile photo Former Member
      Former Member

      Hi,

      You may always use report RSESHOWOBJECT.

      It calls the standard display method of the business object (based on the business object repository - transaction SWO1).

      The logic for most of the objects you listed is already implemented.

      Author's profile photo Yuvaraj Shanmugam
      Yuvaraj Shanmugam

      Hi Otto,

      This is a cool idea. Most people who land on SAP after using a few other applications and web UI's do find it difficult or clumsier and it takes a bit of learning curve to understand how things work in SAP.

      I find it rather interesting to dig and find out how SAP has written every one of its transactions. We can see an evolution in the design of the programs as well.

      For eg., Programs like SAPMSRD0 which is the module pool for data dictionary transaction,SE11 were developed back in 2000s. This program has a FM named RS_DD_SHOW. This FM can be used to display all DD components like Struture, Data Elements, Table and its contents etc.

      But for the latest programs which were developed after around 2005 will have OO in their design and we may not find explicit FMs to carry out tasks. Even if there were, we may have to instanciate the base class and have its reference variable ready. But this doesnt mean we cannot re-use the SAP provided functionalities.

      One of my favourite instance where I have re-used standard SAP functionalities by passing just the function CODE is when I re-used the static method CL_SWF_RDG_DISPATCHER=>EXECUTE_DIALOG_REQUEST_MULTI .

      Using this method most of the workflow related functions like Show Workitem Log, Forward workitem etc by just passing the corresponding workitem number and the function code (WIFI, ASND respectively). Probably I'll write a detailed blog about this and add the link here. πŸ˜€

      May be becuase of things like these, I am never bored.

      Regards,

      Yuvaraj S

      Author's profile photo Nic Teunckens
      Nic Teunckens

      I'd like to add a solution to some issues I had when calling standard Reports like 'MB51' or 'MB5B' ... I wanted to enable a "link-click" for these transactions, only to find that - while the trx. launch & display works - upon leaving the standard report (F3) you're always left exiting the complete dialog, hence not returning to your custom Report.

      I got rid of this by using the FM "SUBMIT_REPORT". See the below code, which launches trx. "MB5B" prepopulated with parameter-values and enabling the 'RET_VIA_LEAVE'-parameter in the FM ...

      CHECK parameters IS NOT INITIAL.


      "Show Report => Issues when SUBMIT, so Use this FM

      CALL FUNCTION 'SUBMIT_REPORT'    

           EXPORTING     report               = co_mb5b 

                                    ret_via_leave    = abap_false  "Allows Return to Original Report

                                    skip_selscreen = abap_true    

           TABLES            selection_table  = parameters    

           EXCEPTIONS   just_via_variant = 1      

                                    no_submit_auth = 2      

                                    OTHERS          = 3.  

      IF sy-subrc <> 0.    

           "Do ...

      ENDIF.

      Author's profile photo Sandra Rossi
      Sandra Rossi

      What is the difference compared to using SUBMIT statement? Is it "only" that SUBMIT_REPORT does an authorization check?

      Author's profile photo Nic Teunckens
      Nic Teunckens

      Well, it seems there isn't much difference there after all so you are correct ...

      In my endeavours to SUBMIT the Standard Report, I didn't make use of the syntax 'AND RETURN' ... So obviously, it would exit abruptly and not return to my custom report.

      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      There is a very convenient function in SD called RV_CALL_DISPLAY_TRANSACTION.

      You only need to give it a document number and, providing the number ranges don't overlap, it can figure out the document type (sales order or contract or invoice, etc. - see VBTYP) and display the document in the corresponding transaction. It is very helpful for adding document display on double-click in the ALV reports, for example. It's not released, of course, just like many other helpful functions πŸ™‚ , so YMMV.