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: 

Regarding Genera task list

Former Member
0 Kudos

Hi Guri ji,

we create one bdc for tcode (IA05). Under this tcode we create one general task list.but when we are going further to create subtask list under this general task list that is not happened.Plz give solution to me .this is urgend.

eport Z_IA05_CREATE_GENERAL_TAST

no standard page heading line-size 255.

TYPES : BEGIN OF TT_ITAB,

PLNNR TYPE MAPL-PLNNR,

STTAG(10),

KTEXT TYPE PLKO-KTEXT,

WERKS TYPE MAPL-WERKS,

ARBPL(8),

VERWE TYPE PLKO-VERWE,

VAGRP TYPE PLKO-VAGRP,

STATU TYPE PLKO-STATU,

STRAT type PLKO-STRAT,

END OF TT_ITAB.

DATA : T_ITAB TYPE STANDARD TABLE OF TT_ITAB WITH HEADER LINE,

W_ITAB TYPE STANDARD TABLE OF TT_ITAB WITH HEADER LINE.

DATA : FLAG TYPE C,

i type i,

s type i.

include bdcrecx1.

start-of-selection.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\FRom NK Singh\task_list.txt'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = T_ITAB

IF SY-SUBRC <> 0.

ENDIF.

perform open_group.

LOOP AT T_ITAB.

REFRESH BDCDATA.

perform bdc_dynpro using 'SAPLCPDI' '3001'.

perform bdc_field using 'BDC_CURSOR'

'RC271-PLNNR'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RC271-PLNNR'

T_ITAB-PLNNR.

perform bdc_field using 'RC271-STTAG'

T_ITAB-STTAG.

case i.

when 1.

perform bdc_dynpro using 'SAPLCPDI' '3200'.

perform bdc_field using 'BDC_CURSOR'

'PLKOD-PLNAL(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ANLG'.

when 2.

perform bdc_dynpro using 'SAPLCPDI' '3200'.

perform bdc_field using 'BDC_CURSOR'

'PLKOD-PLNAL(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ANLG'.

endcase.

perform bdc_dynpro using 'SAPLCPDA' '3010'.

perform bdc_field using 'BDC_CURSOR'

'PLKOD-STRAT'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

s = s + i.

perform bdc_field using 'PLKOD-PLNAL'

s.

perform bdc_field using 'PLKOD-KTEXT'

T_ITAB-KTEXT.

perform bdc_field using 'PLKOD-WERKS'

T_ITAB-WERKS.

perform bdc_field using 'RCR01-ARBPL'

T_ITAB-ARBPL.

perform bdc_field using 'RCR01-WERKS'

T_ITAB-WERKS.

perform bdc_field using 'PLKOD-VERWE'

T_ITAB-VERWE.

perform bdc_field using 'PLKOD-VAGRP'

T_ITAB-VAGRP.

perform bdc_field using 'PLKOD-STATU'

T_ITAB-STATU.

perform bdc_field using 'PLKOD-ANLZU'

'0'.

perform bdc_field using 'PLKOD-STRAT'

T_ITAB-STRAT.

perform bdc_field using 'PLKOD-ISTRU'

''.

perform bdc_transaction using 'IA05'.

At NeW PLNNR.

I = I + 1.

s = 1.

ENDAT.

AT END OF PLNNR.

I = 0.

ENDAT.

ENDLOOP.

perform close_group.

1 REPLY 1

Former Member
0 Kudos

Plz tell me how we can send abap code in sdn in more redable format.

thanks.