Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all 4552 articles
Browse latest View live

BSP Error, The component table is empty

$
0
0

Hello Folks,

 

I have a situation where I am editing existing trade event in crm web ui.

I just changed the description and clicked on save.

Capture.PNG

This is the error which i am getting.

How to resolve this? and i had added two tables through AET, one as form view and one as table view.

Does it have anything to do with this?

Please help!! its urgent.

 

Regards,

Deepak


Campaign Reference on ERP Order

$
0
0

Hello,

 

I want to reference a campaign to an ERP Order and want this reference to be displayed on the ERP Order Header (Component ERP_H).

It should be the similar functionality as in CRM transactions.

Is this possible without development and if so how.

Thanks in advance and best regards

 

Thorsten

LOY_CRD_CARD_SAVE - DO_AFTER_SAVE

$
0
0

Hi Guys,

 

I need to add a new assignment block to loyalty cards. As AET does not allow to add new Tables under loyalty Card object( AET supports this for many objects like Accounts, One order objects), so I am planning to do a bespoke development for this requirement. One of the requirement is delete all entries from this table if the status of the card is changed to invalid. I had a look into the system and came across the badi LOY_CRD_CARD_SAVE. The badi has a method called DO_AFTER_SAVE. Is this recommended to delete entries(dependent objects) from this method ?

 

Should we do a database committ in this method ?

 

Kind regards,

Manas.

Data copy issue in table view used as Popup

$
0
0

Hello everyone,

 

In one of  Web UI enhancement , we had to show a table view as a popup. This popup we need to call on click of a custom button.

We completed all the development and customizing regarding this.

But in last we were facing one issue, user was not able to copy any field data from popup.

I searched on SCN also and came to know that , to enable copy we have to make field as a text area.

 

So below code we have added in GET_P method of that field to solve our issue.

 

Capture123.PNG

 

 

 

 

Hope this small piece of code will help someone to solve their issue without any waste of  time.

 

Regards,

Harish

WEB UI :Sorting incorrect in Custom field for Inbox Results

$
0
0

Hello Experts ,

 

I have tried to debug the issue for quite sometime now without any luck.

Hence reaching out to you.

 

We have enhanced the Inbox Results and added a custom field (field 'due date' below).

While sorting the table the sequence is not correct.

 

I am quite sure that the somewhere declaration/definition of this field has been somehow made as "Non Date" or "String" field.

But i am not able to backtrack from where this is done.

 

There is same date field "Creted On" which works perfectly.(Standard SAP)

 

Could you please give a clue?

 

Due Date 1.JPG

 

Due Date.JPG

 

Regards,

Abhishek Kokate

Urgent : transfer of custom fields of a sales order from ECC to CRM

$
0
0

Hi,

 

We have a sales order which will be created in CRM and replicated to ECC.

 

We have added some custom fields in table VBAK, which we are displaying in the sales order additional data tab B. When the user saves the sales order,we need to transfer the fields back to CRM.

We are aware of the the BADI CRM_DATAEXCHG_BADI.

Also i think we need to conisder the structure BAPIMTCS but not sure how exactly we can use it.

On the CRM side these Z fields exist in the structure BAD_BUS_TRANSN_MESSAGE-CUSTOMER_H of the method CRM_DATAEXCH_R3D_MBDOC_FILL.

Can someone guidde us on how exactly do we transfer the value from ECC VBAK-Z* to CRM  value BAD_BUS_TRANSN_MESSAGE-CUSTOMER_H.

While creating a search page I'm getting an error like this

$
0
0

while inserting code in .htm page it is throwing error like below. I'm new to crm. please help

 

Capture.PNG

Copy & Paste data in transaction launcher

$
0
0

Hi,

I am beginner of CRM. My requirement is create sales documents in transaction launcher from CRM to R3 transactions (VA21, VA01) although not be the best practice ,  I need to copy several cells from excel and paste them in the transaction launcher, but all the elements was copied inside the first cell in quotation. Could you please give a clue? / Do you think that is a limitation of the standard WEB UI?


  1. Copy cells from Excel document.




     2. Paste cells to quotation of the transaction luncher


** The elements only was copied in the first cell in quotation.

 

 

     3.- From R3 in the tcode VA01, work fine

 

Best Regards

Alberto Alcantara


An exception (CX_CRM_UNSUPPORTED_RELATION) occurred

$
0
0

Hi all,

 

i have enhanced business partner  using aet table extension,the newly generated assignment block working fine in Quality and preproduction systems

but its not generating related entity of new view(in production).

 

CALL METHOD SUPER->EH_ONEDIT

       EXPORTING

         HTMLB_EVENT    = HTMLB_EVENT

         HTMLB_EVENT_EX = HTMLB_EVENT_EX.

 

****get parent entity---

     L_RCL_ENTITY ?= ME->TYPED_CONTEXT->PARENT->COLLECTION_WRAPPER->GET_CURRENT( ).

     CHECK L_RCL_ENTITY IS BOUND.

 

     TRY.

         CALL METHOD L_RCL_ENTITY->GET_RELATED_ENTITY

           EXPORTING

             IV_RELATION_NAME = ' ZEXT_BOL_RELAT000E'

*           IV_MODE          = NORMAL

           RECEIVING

             RV_RESULT        = L_RCL_ENTITY_TEMP.

 

       CATCH CX_CRM_GENIL_MODEL_ERROR .

     ENDTRY.


when i execute stmt get_related entity its throwing error  "An exception (CX_CRM_UNSUPPORTED_RELATION) occurred"


please suggest any solution.


Regards,

Praveen

Query Parameters of BOL - Match type, DROP_SEL_PARAMS_ALL, Selection_hints

$
0
0

Hi All,

 

Can some body help me to explain query parameters of GENIL_BOL_BROWSER. I know max hits standard for maximum hits for the query.

 

But are the others Match type, DROP_SEL_PARAMS_ALL, Selection_hints.

Query parameters.jpg

 

Regards,

Devender

Emp/his superiors can only view emp created opportunities in web UI..!

$
0
0

Hi experts,

 

I got a requirement like an employee can only able to search for his/her created opportunities but not visible to other employees. Emp's superiors can search for the same but this option should not be available for her fellow employees. A message should be displayed as  'you are not authorized to view other's opportunities'.

 

Here, other sales org. superiors also should not see the result.

 

How it can be done through coding..as there is no proper org.structure maintained.

 

Please, provide me any inputs..! A reply at your earliest convenience would be much appreciated..!

 

Thanks,

Bhanu

 

.

Browser showing HTTP error 403.

$
0
0

While trying to webui frame work, browser is showing an error message like


"Windows receive a HTTP error message 403 (forbidden)"

 

What will be the reason.Please help.

Web UI form view problem

$
0
0

Hi All,

I tried to create a custom Genil object and followed by creating a bsp component. There I created a form view which will allow me create and save the data in the custom table referred in genil object.

I used the following scn document as a guide to create it.

http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/09/25/implementation-of-a-custom-genil-model-in-web-ui

 

The problem:

1) I have added the code what u mentioned in eh_oncreate in Do_init_contextmethod as well as in event eh_oncreate.

when i run the application first time, everything works fine, i am able to enter the values in the field and clicking on save button, saves the data in the table zmast_cust.

but the new data that is saved is now displayed on form view in greyed out mode. clicking on create button, doesnt initialize the fields,..the fields still remains greyed out.

 

please help.

Facing issues during BP Merge - Roles/Relationships got deleted

$
0
0

Hi Folks,

 

We are trying to merge two Business Partners using standard Merge Functionality.

 

- Search BPs to be merged

- Select BPs and click on Merge

- Create Case, get into Case, and transfer the required data from Source to Master

- Trigger BUPA_REALLIGN Job

 

After doing this, the BPs got successfully merged. However, on the Master BP, the existing Roles and Relationships have been deleted. We are unable to understand the root cause for this.

 

Could you please help us in solving this issue in terms of

- Root Cause

- any config setting is missing?

- Is it standard issue?

 

Thanks for your help.

 

Thanks,

Sandeep

in default drop down field value how to make it first value in empty line ?

$
0
0

Hi team,

 

My requirement is Complaint header page,Category fields( its a drop down field),in this field total values 5.now it is showing default ZRP value.but we want only empty line after that user will select manually one be one.for this i have added the logic on insert line item to lt_ddlb index 1.but still it is shoing default value.how to do it.could you please help.

 

Component - BT120H_CPL

View - BT120H_CPL/Details

Context node - BTADMINH

Attribute - GET_V_CATEGORY

 

Thanks & Regards

Kalpana


How to modify .htm page attributes from outside the .htm?

$
0
0

I'm investigating an issue in our system. In BuPaDetail.htm of view ICCMP_BP_DETAIL/BuPaDetail, some custom code has been added. A flag called 'CHANGEABLE' with type abap_bool has been added. Within the .htm file, there is no code to modify the flag.

 

My question is, where can the code to set or reset the flag be located? or how can we modify page attributes added to the .htm from outside the .htm (like from the view controller implementation class)?

 

Many thanks,

Phil

radio button field visual issue

$
0
0

Hi experts, I have declared a field as radio button  and added the same to the view configuration. In the view, the circles of the radio button is half truncated (Please refer the attached screen shot). I tried changing the resolution of the screen also, but that too didn't helped.. Please help me out, its urgent.

Condition records blank in contract

$
0
0

Hi,

 

I have service contract in CRM, its condition records are  blank even thought pricing procedure is determined correctly. Please suggest why or how this could happen. please find the image attached for reference.

FM to change BDoc state from E04 to F04 manually

$
0
0

Hello

 

I want to know FM's available to change status of error BDocs from E04 to F04 .

 

Your valuable suggestions are welcome.

 


Regards

Sachin Sharma

How to Optimize ALV Report which causes low Performance in Production System

$
0
0

Hi All

 

I had below ALV Report which causes very bad performance when i try to execute in production system due to lot of records exits in production

if user given posting date between one year in selection screen its getting triggered for a long time. i need to improve performance for this report.

Please suggest me from below code where i can do modifications to improve the performance?

 

 

REPORT  ztesting.

 

 

""""""""""""""""""""""Types Declarations""""""""""""""""""""""""""""""""""

TYPES : BEGIN OF ty_crm_order,

        guid  TYPE crmt_object_guid,

        END OF ty_crm_order.

 

 

TYPES : BEGIN OF tl_text2,

        object_id TYPE crmt_object_id_db,

        posting_date TYPE comt_created_at_usr,

        pdate TYPE string,

        ptime TYPE string,

        txt30 TYPE j_txt30,

        desc TYPE crmt_process_description,

        category1 TYPE crm_erms_cat_ca_id, "crmt_description_20,

        category2 TYPE crm_erms_cat_ca_id, "crmt_description_20,

        category3 TYPE crm_erms_cat_ca_id, "crmt_description_20,

        category4  TYPE crm_erms_cat_ca_id, "crmt_description_20,

        string TYPE string,

        transdesp TYPE string,

        rootcause TYPE string,

        priority TYPE sc_txt,

        chreq TYPE bu_namep_f,

        chreq_no TYPE string,

        chman TYPE bu_namep_f,

        supp TYPE string,

        supp_no TYPE string,

        rep_supp TYPE string,

        rep_supp_no TYPE string,

        stdate TYPE char10,

        sttime TYPE sy-uzeit,

        department TYPE ad_dprtmnt,

        extref TYPE crmt_po_number_sold,

        subject TYPE qtxt_code,

        sysid TYPE dnot_sysid,

        chdat TYPE comt_changed_at_usr,

        chdat1 TYPE string,

        chtime1 TYPE string,

        bname TYPE xubname,

        building TYPE ad_bldng_p,

        process_type TYPE crmt_process_type_db,

        mnumm TYPE dnot_mnumm,

        mstat TYPE val_text,

        zero TYPE char2,

        function TYPE crmt_description_20,

        udate TYPE string,

        utime TYPE string,

        country TYPE landx,

        ticket_type TYPE zdtel000000,

        related_uc_no TYPE zdtel000074,

        planned_effort TYPE /aicrm/dtel003j,

        actual_effort TYPE /aicrm/dtel003n,

        solpos_date TYPE string,

        solpos_time TYPE string,

END OF tl_text2.

"""""""""""""""Begin of Tabels Declarations"""""""""""""""""""""""""""""""""""""""""""""""""""""

 

 

TABLES : crmd_orderadm_h,but000,dd07t.

 

 

"""""""""""""end of Table Declarations"""""""""""""""""""""""""""""""""""""""""""""""""""""""

 

 

"""""""""""""begin of Data Declarations""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

DATA : BEGIN OF l_filehead,

           text TYPE char255,

       END OF l_filehead.

 

 

DATA :   t_text2 TYPE TABLE OF tl_text2,

         l_text2 TYPE tl_text2,

         t_filehead LIKE TABLE OF l_filehead,

         l_filename TYPE string,

         l_layout  TYPE slis_layout_alv,

         ls_crm_order TYPE ty_crm_order,

         lv_exit     TYPE  char1,

         ls_variant  TYPE  disvariant,

         gs_variant  TYPE disvariant,

         gv_save(1) TYPE  c,

         lr_order      TYPE REF TO cl_crm_bol_entity,

         lr_adminh     TYPE REF TO cl_crm_bol_entity,

         lr_entity     TYPE REF TO cl_crm_bol_entity,

         lv_guid       TYPE crmt_genil_object_guid,

         lr_core       TYPE REF TO cl_crm_bol_core,

         lr_coll       TYPE REF TO if_bol_entity_col,

         lr_partner_it TYPE REF TO if_bol_entity_col_iterator,

         ls_urgency    TYPE bsp_wd_dropdown_line,

         ls_function   TYPE bsp_wd_dropdown_line,

         ls_priority   TYPE bsp_wd_dropdown_line,

          wa_jcds       TYPE crm_jcds.

 

 

"""""""""""BEGIN OF internal tables""""""""""""""""""""""""""""""""""""""""""

DATA:    lt_crm_order TYPE TABLE OF ty_crm_order,

         lt_urgency    TYPE bsp_wd_dropdown_table,

         lt_function   TYPE bsp_wd_dropdown_table,

         lt_priority   TYPE bsp_wd_dropdown_table,

         lt_text_all   TYPE comt_text_textdata_t,

         lt_text_table TYPE string_table,

         it_jcds TYPE TABLE OF crm_jcds.

"""""""""""""BEGIN OF INTERNAL TABLES"""""""""""""""""""""""""""""""""""""

 

 

 

 

""""""""""""""""""""end of data declartaions""""""""""""""""""""""""""""""""""""""

 

 

""""""""""""BEGIN OF local variables""""""""""""""""""""""""""""""""""""""""""""""""""""""""

DATA:  lv_logtext    TYPE string,

       lv_string     TYPE string,

       lv_bp_guid   TYPE bu_partner_guid,

       lv_username  TYPE syuname,

       lv_domname TYPE char30 VALUE 'DNOE_MSTAT',

       lv_process_type TYPE crmt_process_type VALUE 'ZMIN',

       lv_as4local TYPE char1 VALUE 'A',

       lv_priority   TYPE char40, "string,

       lv_subject    TYPE char40,

       lv_function   TYPE char40,

       lv_category   TYPE string,

       lv_stat       TYPE char10,

       lv_date TYPE string,

       lv_time TYPE string,

       lv_count TYPE string.

 

 

""""""""""end of local variables"""""""""""""""""""""""""""""""""""""""""""""""""""

 

 

 

 

""""""""begin of field symbol"""""""""""""""""""""""""""""""""""""""""""""""""""

FIELD-SYMBOLS: <ls_textdata> LIKE LINE OF lt_text_all.

""""""""""""""end of field symbol"""""""""""""""""""""""""""""""""""""""""""""""

 

 

"""""""""""""""""""""begin of Selection Screen """""""""""""""""""""""""""""""""""

SELECTION-SCREEN BEGIN OF BLOCK cr WITH FRAME.

 

 

SELECT-OPTIONS : s_cr    FOR crmd_orderadm_h-object_id,

                 s_pdate FOR crmd_orderadm_h-posting_date,

                 s_pat   FOR but000-partner NO INTERVALS.

 

 

SELECTION-SCREEN END OF BLOCK cr.

""""""""""""""""""""'end of selection Screen""""""""""""""""""""""""""""""""""

 

 

 

 

SELECTION-SCREEN BEGIN OF BLOCK layout WITH FRAME.

 

 

PARAMETERS: p_vari LIKE disvariant-variant.

 

 

SELECTION-SCREEN END OF BLOCK layout.

""""""""""""At Selection Screen"""""""""""""""""""""""""""""""""""""""""

 

 

AT SELECTION-SCREEN.

 

 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.

 

 

* save before image

  gs_variant = sy-repid.

  IF p_vari IS NOT INITIAL.

    ls_variant = p_vari.

  ELSE.

    ls_variant = gs_variant.

  ENDIF.

  gv_save = 'A'.

* call f4 function

  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

    EXPORTING

      is_variant = gs_variant

      i_save     = gv_save

    IMPORTING

      e_exit     = lv_exit

      es_variant = ls_variant

    EXCEPTIONS

      OTHERS     = 1.

* copy changes

  IF sy-subrc IS INITIAL AND lv_exit IS INITIAL.

    gs_variant     = ls_variant.

    p_vari         = gs_variant-variant.

  ENDIF.

  """"""""""""""""""begin of start of selection"""""""""""""""""""""""""""""""""""""""""""""

 

 

START-OF-SELECTION.

 

 

*   Fecth all the Business Trasaction records

  SELECT guid

      FROM crmd_orderadm_h

      INTO TABLE lt_crm_order

      WHERE object_id IN s_cr      AND

            process_type = lv_process_type  AND

            posting_date IN s_pdate.

 

 

  IF sy-subrc = 0.

    IF s_pat[] IS NOT INITIAL.

      SELECT c~guid_hi  FROM ( ( but000 AS a INNER JOIN crmd_partner AS b  ON a~partner_guid = b~partner_no )

                                         INNER JOIN crmd_link AS c     ON b~guid = c~guid_set )

                                         INTO TABLE lt_crm_order

                                         FOR ALL ENTRIES IN lt_crm_order

                                         WHERE a~partner IN s_pat

                                         AND b~partner_fct = 'SLFN0003'

                                         AND c~objtype_set = '07'

                                         AND c~guid_hi     = lt_crm_order-guid.

 

 

    ENDIF.

 

 

    IF lt_crm_order IS NOT INITIAL.

* Get priority text

      CLEAR lt_priority.

      CALL METHOD cl_crm_uiu_cust_get=>get_values_for_field

        EXPORTING

          iv_fieldname = 'PRIORITY'

        RECEIVING

          rt_value     = lt_priority

        EXCEPTIONS

          OTHERS       = 4.

* Get Function text

      CLEAR lt_function.

      CALL METHOD cl_crm_uiu_cust_get=>get_values_for_field

        EXPORTING

          iv_fieldname = 'IMPACT'

        RECEIVING

          rt_value     = lt_function

        EXCEPTIONS

          OTHERS       = 4.

*  Get Urgency text

      CLEAR lt_urgency.

      CALL METHOD cl_crm_uiu_cust_get=>get_values_for_field

        EXPORTING

          iv_fieldname = 'URGENCY'

        RECEIVING

          rt_value     = lt_urgency

        EXCEPTIONS

          OTHERS       = 4.

* Loading Component Set

      lr_core = cl_crm_bol_core=>get_instance( ).

      lr_core->start_up('ONEORDER').

 

 

      LOOP AT lt_crm_order INTO ls_crm_order.

 

 

        CLEAR lv_guid.

        lv_guid = ls_crm_order-guid.

        lr_order = lr_core->get_root_entity( iv_object_name = 'BTOrder'

                                             iv_object_guid = lv_guid ).

 

 

        IF  lr_order IS BOUND.

          lr_adminh = lr_order->get_related_entity( 'BTOrderHeader' ).

 

 

          IF lr_adminh IS BOUND.

*Get Object Id

            l_text2-object_id = lr_adminh->get_property_as_string( 'OBJECT_ID' ).

*conversion routine

            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

              EXPORTING

                input  = l_text2-object_id

              IMPORTING

                output = l_text2-object_id.

*Get Process Type

            l_text2-process_type  = lr_adminh->get_property_as_string( 'PROCESS_TYPE' ).

 

 

*Get Description

            l_text2-desc       = lr_adminh->get_property_as_string( 'DESCRIPTION' ).

 

 

*Get Created at date and time

            l_text2-pdate      = lr_adminh->get_property_as_string( 'CREATED_AT_DATE' ).

            l_text2-ptime      = lr_adminh->get_property_as_string( 'CREATED_AT_TIME' ).

 

 

*Get Date Last Changed

            l_text2-chdat1     = lr_adminh->get_property_as_string( 'CHANGED_AT_DATE' ).

            l_text2-chtime1    = lr_adminh->get_property_as_string( 'CHANGED_AT_TIME' ).

 

 

* Get the last status change date

 

 

            SELECT *

                      FROM crm_jcds

                      INTO TABLE it_jcds

                      WHERE objnr = lv_guid

                      AND stat = 'E0020'.

 

 

            DESCRIBE TABLE it_jcds LINES lv_count.

            CASE lv_count.

              WHEN 1 OR 2.

                SORT it_jcds BY chgnr ASCENDING.

                READ TABLE  it_jcds INTO  wa_jcds INDEX 1.

              WHEN OTHERS.

 

 

                SORT it_jcds BY chgnr DESCENDING.

                READ TABLE  it_jcds INTO  wa_jcds WITH KEY inact = ' ' chind = 'U'.

            ENDCASE.

** sol pos date

            lv_date = wa_jcds-udate.

            lv_time = wa_jcds-utime.

            CLEAR wa_jcds.

 

 

            CONCATENATE  lv_time+0(2) ':' lv_time+2(2) ':'  lv_time+4(2) INTO lv_time.

            CONCATENATE  lv_date+6(2) '/' lv_date+4(2)   '/' lv_date+0(4)  INTO  lv_date.

 

 

            l_text2-solpos_date = lv_date.

            IF l_text2-solpos_date IS INITIAL.

              l_text2-solpos_date = 'NA'.

            ENDIF.

            CLEAR lv_date.

*** sol pos time

            l_text2-solpos_time = lv_time.

            IF l_text2-solpos_time IS INITIAL.

              l_text2-solpos_time = 'NA'.

            ENDIF.

            CLEAR lv_time.

 

 

* Get Priority

            lr_coll = lr_adminh->get_related_entities( iv_relation_name = 'BTHeaderActivityExt' ). "#EC NOTEXT

            lr_entity = lr_coll->get_current( ).

            IF lr_entity IS BOUND.

              CLEAR lv_priority.

              lv_priority = lr_entity->get_property_as_string( 'PRIORITY' ).

              IF lt_priority IS NOT INITIAL.

                READ TABLE lt_priority INTO ls_priority WITH KEY key = lv_priority.

                IF sy-subrc = 0.

                  l_text2-priority = ls_priority-value.

                ENDIF.

              ENDIF.

            ENDIF.

*Get Status

            lr_coll = lr_adminh->get_related_entities( iv_relation_name = 'BTHeaderStatusSet' ). "#EC NOTEXT

            lr_entity = lr_coll->get_current( ).

            IF lr_entity IS BOUND.

              lr_coll = lr_entity->get_related_entities( iv_relation_name = 'BTStatusHCurrent' ). "#EC NOTEXT

              lr_entity = lr_coll->get_current( ).

              IF lr_entity IS BOUND.

                l_text2-txt30 = lr_entity->get_property_as_string( 'TXT30' ).

              ENDIF.

            ENDIF.

*Get Categories

            lr_coll = lr_adminh->get_related_entities_by_bpath( './BTHeaderCategorySet/BTCategorySchemaAll/BTCategoryFirst_S' ).

            IF lr_coll IS BOUND.

              lr_entity = lr_coll->get_current( ).

              IF lr_entity IS BOUND.

                lv_category    = lr_entity->get_property_as_string( 'CONCATENATED_DESCRIPTION' ).

                SPLIT lv_category AT ',' INTO l_text2-category1 l_text2-category2 l_text2-category3 l_text2-category4.

              ENDIF.

            ENDIF.

* Get Text

            CALL FUNCTION 'CRM_DNO_READ_ORDER_TEXT'

              EXPORTING

                iv_header_guid = lv_guid

              IMPORTING

                et_alltexts    = lt_text_all.

  "Changed to display all texts except SUSD System Data

            IF lt_text_all IS NOT INITIAL.

 

 

              DELETE lt_text_all WHERE NOT ( stxh-tdid = 'SU01' OR stxh-tdid = 'SU99' OR stxh-tdid = 'A004' ). "#EC NOTEXT

 

 

              LOOP AT lt_text_all ASSIGNING <ls_textdata>.

                CALL FUNCTION 'CONVERT_ITF_TO_STREAM_TEXT'

                  EXPORTING

                    language     = sy-langu

                    lf           = 'X'

                  IMPORTING

                    stream_lines = lt_text_table

                  TABLES

                    itf_text     = <ls_textdata>-lines.

 

 

                CLEAR lv_logtext.

                IF lt_text_table IS NOT INITIAL.

                  LOOP AT lt_text_table INTO lv_string.

                    IF sy-tabix = 1.

                      lv_logtext = lv_string.

                    ELSE.

                      CONCATENATE lv_logtext lv_string INTO lv_logtext SEPARATED BY space. "cl_abap_char_utilities=>horizontal_tab.

                    ENDIF.

                  ENDLOOP.

 

 

                  IF <ls_textdata>-stxh-tdid = 'SU01'.

                    CONCATENATE lv_logtext l_text2-string INTO l_text2-string SEPARATED BY space.

                  ENDIF.

                  IF <ls_textdata>-stxh-tdid = 'SU99'.

                    l_text2-transdesp = lv_logtext.

                  ENDIF.

                  IF <ls_textdata>-stxh-tdid = 'A004'.

                    l_text2-rootcause = lv_logtext.

                  ENDIF.

                ENDIF.

              ENDLOOP.

            ENDIF.

 

 

**reading related UC NO and Ticket Type

            lr_entity = lr_adminh->get_related_entity( 'BTHeaderServiceExt' ).

            IF lr_entity IS BOUND.

              l_text2-ticket_type    = lr_entity->get_property_as_string( 'ZZFLD000000' ).

              l_text2-related_uc_no  = lr_entity->get_property_as_string( 'ZZFLD00000H' ).

              l_text2-sysid          = lr_entity->get_property_as_string( '/AICRM/SYSTEM_ID' ).

              l_text2-mnumm          = lr_entity->get_property_as_string( '/AICRM/ICT_NUM' ).

** Fetch the Actual and planned effort

              l_text2-planned_effort = lr_entity->get_property_as_string( '/AICRM/CUSTTXT01' ).

              l_text2-actual_effort  = lr_entity->get_property_as_string( '/AICRM/CUSTTXT03' ).

              CLEAR lv_stat.

              lv_stat               = lr_entity->get_property_as_string( '/AICRM/SAP_STAT' ).

              IF lv_stat IS NOT INITIAL.

 

 

 

 

                SELECT SINGLE * FROM dd07t WHERE domname = lv_domname AND

                                                  ddlanguage = 'EN' AND

                                                  as4local = lv_as4local AND

                                                  domvalue_l = lv_stat.

                IF sy-subrc = 0.

                  l_text2-mstat = dd07t-ddtext.

                ENDIF.

              ENDIF.

            ENDIF.

 

 

*Reading sales attribute

            lr_entity = lr_adminh->get_related_entity( 'BTHeaderSalesSet' ).

            IF lr_entity IS BOUND.

              l_text2-extref = lr_entity->get_property_as_string( 'PO_NUMBER_SOLD' ).

            ENDIF.

 

 

* Reading Service Request attribute

            lr_entity = lr_adminh->get_related_entity( 'BTHeaderSrvRequestExt' ).

            IF lr_entity IS BOUND.

* Reading goal

              lv_function = lr_entity->get_property_as_string( 'IMPACT' ).

              IF lt_function IS NOT INITIAL.

                READ TABLE lt_function INTO ls_function WITH KEY key = lv_function.

                IF sy-subrc = 0.

                  l_text2-function = ls_function-value.

                ENDIF.

              ENDIF.

 

 

*Reading Subject

              CLEAR lv_subject.

              lv_subject = lr_entity->get_property_as_string( 'URGENCY' ).

              IF lt_urgency IS NOT INITIAL.

                READ TABLE lt_urgency INTO ls_urgency WITH KEY key = lv_subject.

                IF sy-subrc = 0.

                  l_text2-subject = ls_urgency-value.

                ENDIF.

              ENDIF.

            ENDIF.

 

 

*Get Partners

            lr_coll = lr_adminh->get_related_entities( iv_relation_name = 'BTHeaderPartnerSet' ).

            IF lr_coll IS BOUND.

              lr_entity = lr_coll->get_current( ).

              lr_coll = lr_entity->get_related_entities( iv_relation_name = 'BTPartnerAll' ).

              IF lr_coll IS BOUND.

                lr_partner_it ?= lr_coll->get_iterator( ).

*Get Supoort team

                lr_entity ?= lr_partner_it->find_by_property( iv_attr_name = 'PARTNER_FCT' iv_value = 'SLFN0003' ).

                IF lr_entity IS BOUND.

                  l_text2-supp_no = lr_entity->get_property_as_string( 'PARTNER_NO' ).

                  l_text2-supp    = lr_entity->get_property_as_string( 'DESCRIPTION_NAME' ).

                ENDIF.

*Get Reporter

                lr_entity ?= lr_partner_it->find_by_property( iv_attr_name = 'PARTNER_FCT' iv_value = 'SLFN0002' ).

                IF lr_entity IS BOUND.

                  l_text2-rep_supp_no = lr_entity->get_property_as_string( 'PARTNER_NO' ).

                  l_text2-rep_supp    = lr_entity->get_property_as_string( 'DESCRIPTION_NAME' ).

                  lv_bp_guid          = lr_entity->get_property_as_string( 'BP_PARTNER_GUID' ).

 

 

                  CALL FUNCTION 'BP_CENTRALPERSON_GET'

                    EXPORTING

                      iv_bu_partner_guid  = lv_bp_guid

                    IMPORTING

                      ev_username         = lv_username

                    EXCEPTIONS

                      no_central_person   = 1

                      no_business_partner = 2

                      no_id               = 3

                      OTHERS              = 4.

                  IF sy-subrc = 0.

                    l_text2-bname = lv_username.

                  ENDIF.

* Get Country

                  lr_entity = lr_entity->get_related_entity( 'BTBusinessPartner' ).

                  IF lr_entity IS BOUND.

                    l_text2-country    = lr_entity->get_property_as_string( 'NAMCOUNTRY' ).

                    IF l_text2-country IS INITIAL.

                      l_text2-country = 'IN'.

                    ENDIF.

                  ENDIF.

                ENDIF.

*Get Processor

                lr_entity ?= lr_partner_it->find_by_property( iv_attr_name = 'PARTNER_FCT' iv_value = 'SLFN0004' ).

                IF lr_entity IS BOUND.

                  l_text2-chreq_no = lr_entity->get_property_as_string( 'PARTNER_NO' ).

                  l_text2-chreq    = lr_entity->get_property_as_string( 'DESCRIPTION_NAME' ).

                ENDIF.

              ENDIF.

            ENDIF.

            APPEND l_text2 TO t_text2.

            CLEAR l_text2.

          ENDIF.

        ENDIF.

        CLEAR ls_crm_order.

      ENDLOOP.

    ENDIF.

  ENDIF.

 

 

END-OF-SELECTION.

"""""""""""""""""""""""END OF SELECTION"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

  SORT t_text2 BY object_id.

  IF t_text2 IS NOT INITIAL.

    PERFORM alv.

  ELSE.

* MESSAGE 'No entries for the specified selection criteria' TYPE 'S'.

    MESSAGE text-000 TYPE 'S'.

  ENDIF.

 

 

*&---------------------------------------------------------------------*

*&      Form  GUI_DOWNLOAD

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM gui_download .

*creating filepath

  CONCATENATE text-002 sy-datum+6(2) '_' sy-datum+4(2) '_'

              sy-datum(4) '_' sy-uzeit '.XLS' INTO l_filename.

 

 

  FREE : t_filehead[].

  CLEAR : l_filehead.

 

 

  l_filehead-text = text-002.  APPEND l_filehead TO t_filehead. CLEAR l_filehead.

  l_filehead-text = text-003.  APPEND l_filehead TO t_filehead. CLEAR l_filehead.

  l_filehead-text = text-004.  APPEND l_filehead TO t_filehead. CLEAR l_filehead.

 

 

  CALL FUNCTION 'GUI_DOWNLOAD'

    EXPORTING

      filename                = l_filename

      filetype                = 'ASC'

      write_field_separator   = 'X'

    TABLES

      data_tab                = t_text2

      fieldnames              = t_filehead[]

    EXCEPTIONS

      file_write_error        = 1

      no_batch                = 2

      gui_refuse_filetransfer = 3

      invalid_type            = 4

      no_authority            = 5

      unknown_error           = 6

      header_not_allowed      = 7

      separator_not_allowed   = 8

      filesize_not_allowed    = 9

      header_too_long         = 10

      dp_error_create         = 11

      dp_error_send           = 12

      dp_error_write          = 13

      unknown_dp_error        = 14

      access_denied           = 15

      dp_out_of_memory        = 16

      disk_full               = 17

      dp_timeout              = 18

      file_not_found          = 19

      dataprovider_exception  = 20

      control_flush_error     = 21

      OTHERS                  = 22.

  IF sy-subrc <> 0.

*    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

*            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  ELSE.

**Log

    PERFORM file_path.

  ENDIF.

 

 

 

 

ENDFORM.                    " GUI_DOWNLOAD

*&---------------------------------------------------------------------*

*&      Form  FILE_PATH

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM file_path .

  WRITE : / 'Filename :',l_filename.

ENDFORM.                    " FILE_PATH

*&---------------------------------------------------------------------*

*&      Form  ALV

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM alv.

  DATA : ifield_cat TYPE slis_t_fieldcat_alv,

         wfield_cat TYPE slis_fieldcat_alv.

 

 

  wfield_cat-fieldname   = 'OBJECT_ID'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Transaction Number'.

  wfield_cat-key        = 'X'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'PROCESS_TYPE'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Transaction Type'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'PDATE'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Created Date'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'PTIME'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Created Time'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'CHDAT1'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Changed Date'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'CHTIME1'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Changed Time'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'DESC'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Transaction Description'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'TXT30'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'User Status'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

  wfield_cat-fieldname   = 'SOLPOS_DATE'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Solution proposed date'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'SOLPOS_TIME'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Solution proposed Time'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'PRIORITY'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Priority'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

 

 

  wfield_cat-fieldname   = 'CATEGORY1'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Category1'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'CATEGORY2'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Category2'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'CATEGORY3'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Category3'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'CATEGORY4'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m   = 'Category4'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'EXTREF'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'External Reference'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'SUBJECT'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Catalog(Sub)'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'CHREQ'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Person Responsible'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

 

 

  wfield_cat-fieldname   = 'SYSID'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'System'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'BNAME'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'User ID'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

 

 

  wfield_cat-fieldname   = 'FUNCTION'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Function'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'MNUMM'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Notification Number'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'MSTAT'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Notification Status at SAP'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'SUPP_NO'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Support Team ID'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'SUPP'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Support Team'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'REP_SUPP_NO'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Reported By ID'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'REP_SUPP'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Reported By'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'TRANSDESP'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Problem Description'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'STRING'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Solution Provided'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'ROOTCAUSE'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Problem RootCause'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

 

 

  wfield_cat-fieldname   = 'COUNTRY'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'COUNTRY'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'TICKET_TYPE'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Ticket Type'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'RELATED_UC_NO'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Related UC NO'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

 

 

  wfield_cat-fieldname   = 'PLANNED_EFFORT'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Planned effort'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

  wfield_cat-fieldname   = 'ACTUAL_EFFORT'.

  wfield_cat-tabname     = 'T_TEXT2'.

  wfield_cat-seltext_m  = 'Actual effort'.

  APPEND wfield_cat TO ifield_cat.

  CLEAR wfield_cat.

 

 

 

 

  l_layout-zebra = 'X'.

  l_layout-colwidth_optimize = 'X'.

 

 

 

 

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

      i_callback_program = sy-repid

      it_fieldcat        = ifield_cat

      is_layout          = l_layout

      i_save             = 'A'

    TABLES

      t_outtab           = t_text2.

ENDFORM.

Viewing all 4552 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>