Skip to Content
author's profile photo Former Member
Former Member

Transaction BP start in sales area - status view screen

I'm calling from outside of R/3 (from CRM).

I want to start online transaction BP started, but I want to start up in the sales area, and the screen status. This is crucial because it is must be done several times by the users.

I have tried to see examples in the code how memory with structure BUS_NAVIGATION is filled. But it does not work.

Any suggestions?

BR

Bent Holm Nielsen

bhn@egmont.com

FUNCTION ZE_SD_CIC_CALL_TRANS_BP.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     VALUE(TCODE) TYPE  TCODE
*"     VALUE(KUNNR) TYPE  KUNNR OPTIONAL
*"----------------------------------------------------------------------
  DATA lv_key(34) TYPE c.
  DATA ls_indx    TYPE indx.

  constants: gc_shared_buffer_id type INDX-SRTFD value
            'BUPA_NAVIGATION_REQ'.

  data: ev_instance type ref to CL_BUPA_NAVIGATION_REQUEST.
  data GS_NAVIGATION type BUS_NAVIGATION .
  data GS_NAVIGATIONX type BUS_NAVIGATIONX .
  data GV_TITLE type BUS_SCREEN-TITLE .

  if tcode eq 'BP' and not kunnr is initial.
    SELECT single PARTNER_GUID into gs_navigation-PARTNER_GUID
           FROM  BUT000
           WHERE  PARTNER       = kunnr.
    if sy-subrc gt 0.
      exit.
    endif.
    data: lt_role type BU_role_t,
          ls_role type BU_RLTYP,
          lin type i.

    refresh lt_role.
    SELECT RLTYP appending table lt_role
           FROM  BUT100
           WHERE  PARTNER  = kunnr.
    describe table lt_role lines lin.
    if lin le '1'.
      read table lt_role into ls_role index 1.
      if sy-subrc eq 0.
        gs_navigation-BUPA-PARTNER_ROLE = ls_role.
      else.
        exit.    "The function module
      endif.
    else.
      read table lt_role into ls_role
                 with key 'ZCRM01'.  "sold-to
      if sy-subrc eq 0.
        gs_navigation-BUPA-PARTNER_ROLE = ls_role.
      else.
        read table lt_role into ls_role index 1.
        if sy-subrc eq 0.
          gs_navigation-BUPA-PARTNER_ROLE = ls_role.
        else.
          exit.    "The function module
        endif.
      endif.
    endif.
* Start Export data to the ABAP memory
    gs_navigation-bupa-activity       = '02'.
    gs_navigation-bupa-sub_header_id  = 'LOCU90'. "Status screen at bp
    gs_navigation-bupa-sub_header_tab = 'LOCU90'. "Status screen at bp

*Break sapbhn.
*data: lt_fields type table of BUS0FLDVAL,
*      ls_fields type BUS0FLDVAL.
*
*    ls_fields-TBFLD = 'RF02D-VKORG'.
*    ls_fields-FLDVL = 'S001'.
*    insert ls_fields into table lt_fields.
*    gs_navigation-bupa-FIELD_VALUES[] = lt_fields[].


    CONCATENATE gc_shared_buffer_id sy-uname INTO lv_key.
    gs_navigationx-partner_guid      = 'X'. "Guid
    gs_navigationx-bupa-partner_role = 'X'. "Role
    gs_navigationx-bupa-activity     = 'X'. "Change mode

    EXPORT gs_navigation  FROM gs_navigation
           gs_navigationx FROM gs_navigationx
           gv_title       FROM gv_title
           TO DATABASE indx(bp) FROM ls_indx ID lv_key.
* End  Export data to the ABAP memory
    call transaction 'BP'.
  endif.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 05:37 PM

    Hi,

    have you found any solution?

    Please, if you have, send me an email to ferrando.rosa@gmail.com

    I would appreciate so much your explanations.

    Best Regards,

    Rosa

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.