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: 

Transport Request Import

former_member213851
Active Contributor
0 Kudos

Hi Gurus,

Please let  me know the table which stores the details about "Upto which server the transport req is imported" i.e. Whether TR is in Quality or in Production.

I tried to debug the SE09 TCODE by clicking on TR  folowed by the Log but couldn't succeed.

My requirement is once you enter TR no on selection screen, after executing the report should give details:

Transport Req No  importd on Quality serverimportd on Production server
******12345                    yes/no                    yes/no

Please let me know.

Thanks in Advance.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Try to use the FM TR_READ_GLOBAL_INFO_OF_REQUEST which will return a deep structure parameter with the log from release of the request to import in every target system.

* Data definition

  type-pools: ctslg.

  data: ls_cofile type ctslg_cofile,

        ls_system type ctslg_system,

        ls_step type ctslg_step,

        ls_action type ctslg_action.

* Get information

   call function 'TR_READ_GLOBAL_INFO_OF_REQUEST'

      exporting

        iv_trkorr = p_record-trkorr

      importing

        es_cofile = ls_cofile.

* Analyze

    " List of systems (source and targets) and global RC

    loop at ls_cofile-systems into ls_system.

      " List of steps (like ddic import) and global RC

      loop at ls_system-steps into ls_step.

        loop at ls_step-actions into ls_action.

          " Log timestamp and RC

        endloop.

      endloop.

    endloop.

From your question, you only require to loop at systems list checking existence of information for quality and production system and if found checking return code.

Regards,

Raymond

14 REPLIES 14

former_member585060
Active Contributor
0 Kudos

Hi,

     You can get the information in SAP table

E070 :- Change & Transport System: Header of Requests/Tasks

Use the RFC function modules like 'RFC_GET_TABLE_ENTRIES' or 'RFC_READ_TABLE' to read E070 table entries from Quality and Production systems. Then process on those fetched entries. if an entry found for specific TR in Quality table then, it is in Quality if Found in Production table then the TR is in Production.

Or

You can only fetch the entry from Quality system using RFC function modules and based on the E070-TRSTATUS field value, you can identify if the TR is in quality only or moved into Production.

If a TR is released the E070-TRSTATUS field will have 'R', if not released it will have 'D'.

Thanks & Regards

Bala Krishna

0 Kudos

Hi Bala,

Thanks for the reply.

I have tried using RFC_GET_TABLE_ENTRIES but it gave short dump.

RFC_READ_TABLE gave  Runtime Errors : CALL_FUNCTION_CONFLICT_TYPE -Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE

Description :

The reason for the exception is:

The call to the function module "RFC_READ_TABLE" is incorrect:

The function module interface allows you to specify only

fields of a particular type under "QUERY_TABLE".

The field "E070" specified here is a different

field type

.

my code is as follows:

  DATA: options TYPE STANDARD TABLE OF rfc_db_opt ,

       fields TYPE STANDARD TABLE OF rfc_db_fld  .

data: gt_e070 type table of e070.


CALL FUNCTION 'RFC_READ_TABLE'

       EXPORTING

         query_table                = E070

*       DELIMITER                  = ' '

*       NO_DATA                    = ' '

*       ROWSKIPS                   = 0

*       ROWCOUNT                   = 0

       tables

         OPTIONS                    = options

         fields                     = fields

         data                       = gt_e070

      EXCEPTIONS

        TABLE_NOT_AVAILABLE        = 1

        TABLE_WITHOUT_DATA         = 2

        OPTION_NOT_VALID           = 3

        FIELD_NOT_VALID            = 4

        NOT_AUTHORIZED             = 5

        DATA_BUFFER_EXCEEDED       = 6

        OTHERS                     = 7

               .

     IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

     ENDIF.

Can you please suggest what to do?

0 Kudos

Hi Sachin,

pass table name with string delimiters:

query_table            = 'E070'

add a line to OPTIONS table with condition 'TRKORR = <your transport number>.

The try again.

Regards

Clemens

0 Kudos

Hi Clemens ,

Thanks for the reply.I am using the FM 'RFC_READ_TABLE first time.

  I didn't get you by "add a line to OPTIONS table with condition 'TRKORR = <your transport number."

Can you please explain this further.

0 Kudos

Hi,

     By providing the Transport Request in Option tables, it works similar to the WHERE clause in SELECT statement. So entry for E070 can be fetched from the target system for only that record.

The entry returned in the tables parameter 'DATA' will be flat structure, so you have to provide the delimiter value in exporting parameter 'DELIMITER' so that you can loop in the returned table and fill into gt_e070 table by splitting the records in the delimiter you provided.

You can simple test the FM in SE37, by providing the RFC Target system and the QUERY_TABLE value and the DELIMITER value.

Thanks & Regards

Bala Krishna

0 Kudos

hi Bala,

I have added below code to existing code:

  DATA: options TYPE STANDARD TABLE OF rfc_db_opt ,

fields TYPE STANDARD TABLE OF rfc_db_fld  .

select-options : tr_no for e070-TRKORR.

options = tr_no.

    CALL FUNCTION 'RFC_READ_TABLE'

           EXPORTING

             query_table                = 'E070'

*           DELIMITER                  = ' '

*           NO_DATA                    = ' '

*           ROWSKIPS                   = 0

*           ROWCOUNT                   = 0

           TABLES

             OPTIONS                    = options

             fields                     = fields

             data                       = gt_e070

          EXCEPTIONS

            TABLE_NOT_AVAILABLE        = 1

            TABLE_WITHOUT_DATA         = 2

            OPTION_NOT_VALID           = 3

            FIELD_NOT_VALID            = 4

            NOT_AUTHORIZED             = 5

            DATA_BUFFER_EXCEEDED       = 6

            OTHERS                     = 7

                   .

         IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

         ENDIF.


but I am getting error "The type of "TR_NO" cannot be converted to the type of "OPTIONS"."

0 Kudos

Hi Bala,

As suggested bu you, I have used second method:

You can only fetch the entry from Quality system using RFC function modules and based on the E070-TRSTATUS field value, you can identify if the TR is in quality only or moved into Production.

If a TR is released the E070-TRSTATUS field will have 'R', if not released it will have 'D'.

but i am doubtful about the highlighted part. Because while debugging I got the status of the TRs  as "R" which are not released to Production server.

Can anybody help me ...

0 Kudos

Hi,

     It seems that the E070-TRSTATUS field value will be 'D' only in DEV systems, once it is released to Quality it gets changed to 'R' and It is always 'R' in Quality and Production. So you might have to use RFC to production system as well.

You can try the function modules suggested by Thomas or another procedure suggested by Vinit.

Thanks & Regards

Bala Krishna

ThomasZloch
Active Contributor
0 Kudos

I'm not sure whether this can be solved reliably via E070 entries. Also, if you want to save yourself the RFC calls, you could try reading the transport request control files using function modules STRF_READ_COFILE or TR_READ_GLOBAL_INFO_OF_REQUEST. It is sufficient to read the control files from the DEV system, as they sit in a shared directory that is the same for all boxes in the landscape.

Please search for previous discussions about control files and these two function modules for information on how to evaluate the returned information for your purpose.

Thomas

former_member189779
Active Contributor
0 Kudos

Hi Sachin,

I have created a TR tool to check consistency across landscape. Some how I am not able to attach the document here...not sure whrere is the option.

Please contact me I will try to send you the file.

0 Kudos

If you want, you could post this as a document or add it to the ABAP wiki space. This would be better than sending it "behind the scenes".

Thomas

0 Kudos

Hi Vinit,

I have updated my email id in profile. Please send me the document

raymond_giuseppi
Active Contributor
0 Kudos

Try to use the FM TR_READ_GLOBAL_INFO_OF_REQUEST which will return a deep structure parameter with the log from release of the request to import in every target system.

* Data definition

  type-pools: ctslg.

  data: ls_cofile type ctslg_cofile,

        ls_system type ctslg_system,

        ls_step type ctslg_step,

        ls_action type ctslg_action.

* Get information

   call function 'TR_READ_GLOBAL_INFO_OF_REQUEST'

      exporting

        iv_trkorr = p_record-trkorr

      importing

        es_cofile = ls_cofile.

* Analyze

    " List of systems (source and targets) and global RC

    loop at ls_cofile-systems into ls_system.

      " List of steps (like ddic import) and global RC

      loop at ls_system-steps into ls_step.

        loop at ls_step-actions into ls_action.

          " Log timestamp and RC

        endloop.

      endloop.

    endloop.

From your question, you only require to loop at systems list checking existence of information for quality and production system and if found checking return code.

Regards,

Raymond

0 Kudos

Hi Bala,

I am  using below code :

DATA: gt_de070 TYPE STANDARD TABLE OF tab512 WITH HEADER LINE,

       gt_qe070 TYPE STANDARD TABLE OF tab512 WITH HEADER LINE,

       gt_pe070 TYPE STANDARD TABLE OF tab512 WITH HEADER LINE.

DATA : gt_qe071 TYPE STANDARD TABLE OF tab512 WITH HEADER LINE.

   sys = 'PEQ300'.

       CALL FUNCTION 'RFC_READ_TABLE' DESTINATION sys

         EXPORTING

           query_table          = 'E070'

           delimiter            = '|'

*         NO_DATA              = ' '

*         ROWSKIPS             = 0

*         ROWCOUNT             = 0

         TABLES

           options              = options

           fields               = fields

           data                 = gt_qe070

         EXCEPTIONS

           table_not_available  = 1

           table_without_data   = 2

           option_not_valid     = 3

           field_not_valid      = 4

           not_authorized       = 5

           data_buffer_exceeded = 6

           OTHERS               = 7.

       IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

       ENDIF.

*CLEAR : fields ,options.

  CALL FUNCTION 'RFC_READ_TABLE' DESTINATION sys

         EXPORTING

           query_table          = 'E071'

           delimiter            = '|'

*         NO_DATA              = ' '

*         ROWSKIPS             = 0

*         ROWCOUNT             = 0

         TABLES

           options              = options1

           fields               = fields1

           data                 = gt_qe071

         EXCEPTIONS

           table_not_available  = 1

           table_without_data   = 2

           option_not_valid     = 3

           field_not_valid      = 4

           not_authorized       = 5

           data_buffer_exceeded = 6

           OTHERS               = 7.

       IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

       ENDIF.

I am getting values for E070 (check table E07T ) table in gt_qe070 from Quality server but not for  E071 ( no check table)  in table gt_qe071

It gives exception : Others. for gt_qe071.

Can anybody please suggest me how to resolve this issue.