cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction IA05 - Create general maintenance task list

Former Member
0 Kudos

Hi all,

How to use the standard program RIIBIP00 or transaction IBIP for data transfer for Transaction Code IA05 - Create general maintenance task list .

What are the steps ?

Points guaranteed.

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member308560
Discoverer
0 Kudos

See the structure IBIPTMAT.

Former Member
0 Kudos

This message was moderated.

Vijay
Active Contributor
0 Kudos

hi

just create the below mentioned custom FM in se37 with import parameters and tables as shown in import parameters and tables below.

this will work fine as i too have done this.

FUNCTION z_pm1_bapi_upload_taskslist .

*"----


""Local Interface:

*" IMPORTING

*" VALUE(TASKLISTHEADER) TYPE IBIPTLST

*" TABLES

*" RETURN STRUCTURE BAPIRET2 OPTIONAL

*" TASKSLISTOPERATION STRUCTURE IBIPTLOP

*" TASKSLISTCOMPONENT STRUCTURE ZPMS_TL_MATERIAL

*"----


*----


  • DATA

*----


  • INTERNAL TABLES

DATA: it_l_tab_records TYPE TABLE OF ibiprec, " For IBIP data transfer

it_l_mess TYPE TABLE OF ibipmess," For Messages

  • WORK AREAS

wa_l_tab_records TYPE ibiprec, " For Data Transfer

wa_l_params TYPE ibipparms," Data transfer parameters

wa_l_mess TYPE ibipmess, " For Batch Input Messages

wa_l_ret TYPE bapiret2, " For messages

wa_l_tasklistop TYPE ibiptlop, " For operation data

wa_l_tasklistmat TYPE ibiptmat, " For Components data

wa_l_tasklistcm TYPE zpms_tl_material,

CONSTANTS: c_calltran TYPE calltran VALUE 'X',

c_true TYPE char1 VALUE 'X',

c_inttab TYPE inttab_flg VALUE 'X',

c_callmode TYPE callmode VALUE 'N',

c_error TYPE char1 VALUE 'E',

c_updatemode TYPE updatemode VALUE 'S'.

*FM Z_PM1_IBIP_BATCH_INPUT will be used to create Tasks List.

*It requires data in internal table of type IBIPREC.

*For creating Tasks List data needs to be predefined sequence. This Sequence would be

  • IBIPTLST -- > Tasks List Header

  • IBIPTLOP --> For Each Operation

  • IBIPTMAT --> For Each Material in Operation

*Fill Data Table with Header Data

wa_l_tab_records = tasklistheader.

APPEND wa_l_tab_records TO it_l_tab_records.

CLEAR wa_l_tab_records.

  • Fill Data Table with Operation

LOOP AT taskslistoperation INTO wa_l_tasklistop.

wa_l_tab_records = wa_l_tasklistop.

APPEND wa_l_tab_records TO it_l_tab_records.

CLEAR wa_l_tab_records.

  • For each Operation fill Material Data into Data Table

LOOP AT taskslistcomponent INTO wa_l_tasklistcm

WHERE vornr = wa_l_tasklistop-vornr.

MOVE-CORRESPONDING wa_l_tasklistcm TO wa_l_tasklistmat.

wa_l_tab_records = wa_l_tasklistmat.

APPEND wa_l_tab_records TO it_l_tab_records.

CLEAR : wa_l_tasklistcm,

wa_l_tab_records .

ENDLOOP.

CLEAR wa_l_tasklistop .

ENDLOOP.

  • Fill parameters

wa_l_params-calltran = c_calltran.

wa_l_params-inttab = c_inttab.

wa_l_params-callmode = c_callmode.

wa_l_params-updatemode = c_updatemode.

wa_l_params-dark = c_true.

wa_l_params-log_mess = c_true.

wa_l_params-ind_bal = space.

  • Call IBIP using FM and pass Data Table

CALL FUNCTION 'Z_PM1_IBIP_BATCH_INPUT'

EXPORTING

ibipparms_imp = wa_l_params

  • IMPORTING

IBIPMESS_EXP = wa_l_mess

TABLES

  • BDCDATA_EXP =

int_tab_imp = it_l_tab_records

message_tab = it_l_mess

EXCEPTIONS

customizing_table_error = 1

data_access_error = 2

exactly_one_mode_not_defined = 3

exactly_one_source_not_defined = 4

int_tab_more_than_one_trans = 5

invalid_data_structure = 6

no_source_data = 7

sapindx_not_found = 8

transaction_not_supported = 9

unix_data_can_not_be_deleted = 10

OTHERS = 11

.

IF sy-subrc <> 0.

CLEAR wa_l_ret.

wa_l_ret-type = 'E'.

MESSAGE ID sy-msgid

TYPE sy-msgty

NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4

INTO wa_l_ret-message.

APPEND wa_l_ret TO return.

ENDIF.

  • Fill up internal table for messages

LOOP AT it_l_mess INTO wa_l_mess.

wa_l_ret-type = wa_l_mess-msgty.

wa_l_ret-id = wa_l_mess-msgid.

wa_l_ret-number = wa_l_mess-msgno.

wa_l_ret-message = wa_l_mess-msgli.

wa_l_ret-message_v1 = wa_l_mess-msgv1.

wa_l_ret-message_v2 = wa_l_mess-msgv2.

wa_l_ret-message_v3 = wa_l_mess-msgv3.

wa_l_ret-message_v4 = wa_l_mess-msgv4.

APPEND wa_l_ret TO return.

CLEAR : wa_l_mess,

wa_l_ret.

ENDLOOP.

ENDFUNCTION.

in case of any problem ask me.

<b>reward points if helpful</b>

regards

vijay

Vijay
Active Contributor
0 Kudos

hi

just use the second one and change 'Z_PM1_IBIP_BATCH_INPUT' to

IBIP_BATCH_INPUT.

REGARDS

VIJAY

former_member181923
Active Participant
0 Kudos

Vijay -

Please provide definition of structure:

ZPMS_TL_MATERIAL

(I'm not on an SAP system right now, and I assume this is a custom dictionary object, not an SAP-provided object.)

Thanks very much and best regards

David Halitsky

Former Member
0 Kudos

Hi Vijay,

Can you please provide definition of structure: ZPMS_TL_MATERIAL.

Thanks and Regards,

Anuj

Vijay
Active Contributor
0 Kudos

hi

just create the below mentioned custom FM in se37 with import parameters and tables as shown in import parameters and tables below.

this will work fine as i too have done this.

FUNCTION z_pm1_bapi_upload_taskslist .

*"----


""Local Interface:

*" IMPORTING

*" VALUE(TASKLISTHEADER) TYPE IBIPTLST

*" TABLES

*" RETURN STRUCTURE BAPIRET2 OPTIONAL

*" TASKSLISTOPERATION STRUCTURE IBIPTLOP

*" TASKSLISTCOMPONENT STRUCTURE ZPMS_TL_MATERIAL

*"----


*----


  • DATA

*----


  • INTERNAL TABLES

DATA: it_l_tab_records TYPE TABLE OF ibiprec, " For IBIP data transfer

it_l_mess TYPE TABLE OF ibipmess," For Messages

  • WORK AREAS

wa_l_tab_records TYPE ibiprec, " For Data Transfer

wa_l_params TYPE ibipparms," Data transfer parameters

wa_l_mess TYPE ibipmess, " For Batch Input Messages

wa_l_ret TYPE bapiret2, " For messages

wa_l_tasklistop TYPE ibiptlop, " For operation data

wa_l_tasklistmat TYPE ibiptmat, " For Components data

wa_l_tasklistcm TYPE zpms_tl_material.

CONSTANTS: c_l_calltran TYPE calltran VALUE 'X',

c_l_inttab TYPE inttab_flg VALUE 'X',

c_l_callmode TYPE callmode VALUE 'N',

c_l_updatemode TYPE updatemode VALUE 'S'.

*FM Z_PM1_IBIP_BATCH_INPUT will be used to create Tasks List.

*It requires data in internal table of type IBIPREC.

*For creating Tasks List data needs to be predefined sequence. This Sequence would be

  • IBIPTLST -- > Tasks List Header

  • IBIPTLOP --> For Each Operation

  • IBIPTMAT --> For Each Material in Operation

*Fill Data Table with Header Data

wa_l_tab_records = tasklistheader.

APPEND wa_l_tab_records TO it_l_tab_records.

CLEAR wa_l_tab_records.

  • Fill Data Table with Operation

LOOP AT taskslistoperation INTO wa_l_tasklistop.

wa_l_tab_records = wa_l_tasklistop.

APPEND wa_l_tab_records TO it_l_tab_records.

CLEAR wa_l_tab_records.

  • For each Operation fill Material Data into Data Table

LOOP AT taskslistcomponent INTO wa_l_tasklistcm

WHERE vornr = wa_l_tasklistop-vornr.

MOVE-CORRESPONDING wa_l_tasklistcm TO wa_l_tasklistmat.

wa_l_tab_records = wa_l_tasklistmat.

APPEND wa_l_tab_records TO it_l_tab_records.

CLEAR : wa_l_tasklistcm,

wa_l_tab_records .

ENDLOOP.

CLEAR wa_l_tasklistop .

ENDLOOP.

  • Fill parameters

wa_l_params-calltran = c_l_calltran.

wa_l_params-inttab = c_l_inttab. " To Indicate Data is contained in Internal Table

wa_l_params-callmode = c_l_callmode.

wa_l_params-updatemode = c_l_updatemode.

  • Call IBIP using FM and pass Data Table

CALL FUNCTION 'Z_PM1_IBIP_BATCH_INPUT'

EXPORTING

ibipparms_imp = wa_l_params

  • IMPORTING

  • IBIPMESS_EXP =

TABLES

  • BDCDATA_EXP =

int_tab_imp = it_l_tab_records

message_tab = it_l_mess

EXCEPTIONS

customizing_table_error = 1

data_access_error = 2

exactly_one_mode_not_defined = 3

exactly_one_source_not_defined = 4

int_tab_more_than_one_trans = 5

invalid_data_structure = 6

no_source_data = 7

sapindx_not_found = 8

transaction_not_supported = 9

unix_data_can_not_be_deleted = 10

OTHERS = 11

.

IF sy-subrc <> 0.

CLEAR wa_l_ret.

wa_l_ret-type = 'E'.

MESSAGE ID sy-msgid

TYPE sy-msgty

NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4

INTO wa_l_ret-message.

APPEND wa_l_ret TO return.

ENDIF.

  • Fill up internal table for messages

LOOP AT it_l_mess INTO wa_l_mess.

wa_l_ret-type = wa_l_mess-msgty.

wa_l_ret-id = wa_l_mess-msgid.

wa_l_ret-number = wa_l_mess-msgno.

wa_l_ret-message = wa_l_mess-msgli.

wa_l_ret-message_v1 = wa_l_mess-msgv1.

wa_l_ret-message_v2 = wa_l_mess-msgv2.

wa_l_ret-message_v3 = wa_l_mess-msgv3.

wa_l_ret-message_v4 = wa_l_mess-msgv4.

APPEND wa_l_ret TO return.

CLEAR : wa_l_mess,

wa_l_ret.

ENDLOOP.

ENDFUNCTION.

in case of any problem ask me.

<b>reward points if helpful</b>

regards

vijay

Former Member
0 Kudos

This can be executed from LSMW. LSMW will assist you in converting the data into the proper format. You can use IBIP alone but getting the structure dead on is very tricky.

Try using LSMW for this - Object 0490 Method 0000. You will need to change the default setting of TCODE for it to function properly.

After LSMW reads and converts the data it will call RIIBIP00 to load the data. Same result - different method.

amit_khare
Active Contributor
0 Kudos

Open Tcode IBIP and clcik on the 'i' symbol for documentation.

I think it is in very detail to understand the tcode.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Hi Amit,

Thanks for your reply.

I've already seen the documentation but I am not able to get the format of the input file to be provided .

Former Member
0 Kudos

According to the program documentation, data is to be provided in the following format :

Structure - IBIPTLST Task list header

>> IBIPTEXT (see comment below)

>> IBIPTLOP Operations

>> IBIPTEXT (see comment below)

>> IBIPTMAT Material for one operation

>> IBIPPRTS Production resources/tools (PRT

>> LONGTEXT (see comment below)

> IBIPMPAC Maintenance packages (up to 32)

>> IBIPBDCD (see comment below) from operation

overview

each of the above is a structure.

But the input format of data is not understood.

Can somebody help out ?