Skip to Content
0

Calling SAP CRM BP Transaction (Long text tab) with Required Text ID and Language from Report

Apr 10 at 02:26 PM

43

avatar image
Former Member

Hi ,I was trying to call the BP trnsaction with choosen text id and language from report but not working as expected.

Below code has been used to call the BP transaction with fieldnames (Text id and language).

With this below code transaction BP get called but with defualt first text id(Ex ZCLN) which was set up in customization.. I want the my text id (Ex : ZCIS) which is passing from report insted default text type.

Please help me..

DATA: lt_fields TYPE TABLE OF bus0fldval,
ls_fields TYPE bus0fldval.

DATA gs_navigation TYPE bus_navigation .

CREATE OBJECT l_bupa_request.

IF la_options IS INITIAL.

CREATE OBJECT la_options.
CALL METHOD la_options->set_locator_visible( space ).
CALL METHOD la_options->set_locator_active_tab
EXPORTING
iv_value = 'B'.
ENDIF.

l_partner = selfield-value.

** Fill the request fields.
CALL METHOD l_bupa_request->set_maintenance_id
EXPORTING
iv_value = l_bupa_request->gc_maintenance_id_partner.

*
CALL METHOD l_bupa_request->set_partner_number( l_partner ).
*

CALL METHOD l_bupa_request->set_bupa_activity
EXPORTING
iv_value = l_bupa_request->gc_activity_change.

l_index = selfield-tabindex.

READ TABLE i_output INTO la_output INDEX l_index.
IF sy-subrc = 0.

ls_fields-tbfld = 'THEAD-TDID'.
ls_fields-fldvl = la_output-textid. "Text Id FROM Report Output
INSERT ls_fields INTO TABLE lt_fields.

ls_fields-tbfld = 'THEAD-TDSPRAS'. "Language from Report Output
ls_fields-fldvl = la_output-textid.
INSERT ls_fields INTO TABLE lt_fields.

gs_navigation-bupa-field_values[] = lt_fields[].

CALL METHOD l_bupa_request->set_bupa_field_values
EXPORTING
it_values = gs_navigation-bupa-field_values[]
.
* Call BP Maintenance Transaction
CALL METHOD cl_bupa_dialog_joel=>start_with_navigation
EXPORTING
iv_request = l_bupa_request
iv_options = la_options
iv_in_new_internal_mode = 'X'
EXCEPTIONS
OTHERS = 0.
IF sy-subrc <> 0.
MESSAGE text-016 TYPE 'I'.
ENDIF.
ENDIF.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Domi Bigl Apr 21 at 05:17 PM
0

Hi

That's not possible in this way - but if you don't really need a new mode ( iv_in_new_internal_mode = 'X' ) you can use these FMs to set the default ID and language:

...
iv_in_new_internal_mode = abap_false
...
  CALL FUNCTION 'COM_TEXT_DEFAULT_LANGUAGE_SET'
    EXPORTING
      iv_spras = la_output-spras. "<= ?

  CALL FUNCTION 'COM_TEXT_DEFAULT_TEXTID_SET'
    EXPORTING
      iv_object    = ''
      iv_procedure = ''
      iv_textname  = ''
      iv_textid    = la_output-textid.


and to switch to the right tab use (https://archive.sap.com/discussions/thread/446654)

l_bupa_request->set_bupa_sub_header_tab( iv_value = 'CRM011' ). "<= From Table TBZ3A


regards

Domi

Share
10 |10000 characters needed characters left characters exceeded