cancel
Showing results for 
Search instead for 
Did you mean: 

Change WBS status to TECO

Former Member
0 Kudos

Hi Guys,

Can you please help we with the solution to set deletion indicator in purchase requisition account assignment or close purchase requisition. A purchase requisition of $3.600.000,00 was created through Project system Network-External Processing and it has 2 duplicate network activities and $2.246.577,20 was converted to purchase order then $1,353,423 became the network remaining order plan. A purchase order service entry sheet was accepted and the invoice was created. Now Iu2019m experiencing problem when Iu2019m trying to change WBS element and Network system status to TECO in order to remove the remaining order plan of $1,353,423. Iu2019m getting error message number:06411 the procedure I have follow to correct the error is to reduce quantities in the account assignment item and delete superfluous account assignment by setting deletion in each case but I cannot do that because the fields are grey

Regards

Sandile

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sandile,

Can you please create and run the following report ZZ_CHECK_SERVICE. Execute the report in test mode. Check the Preqs to be deleted. Then execute the report in update mode (Test run = initial). Here, a deletion indicator (LOEKZ) is written on the database for the incorrect account assignment records (EBKN) with initial G/L account.

REPORT ZZ_CHECK_SERVICE .

TABLES: eban, ebkn, afvc.

DATA: eban_tab LIKE eban OCCURS 0 WITH HEADER LINE.

DATA: eban_del LIKE eban OCCURS 0 WITH HEADER LINE.

DATA: ebkn_tab LIKE ebkn OCCURS 0 WITH HEADER LINE.

DATA: ebkn_del LIKE ebkn OCCURS 0 WITH HEADER LINE.

DATA: afvc_tab LIKE afvc OCCURS 0 WITH HEADER LINE.

DATA: aufnr LIKE afko-aufnr.

DATA: ls_ebkn LIKE ebkn.

DATA: ls_ebkn_2 LIKE ebkn.

data: lv_menge like ebkn-menge.

PARAMETERS testrun TYPE c DEFAULT 'X' AS CHECKBOX.

  • select PR from service activities

SELECT * FROM eban INTO TABLE eban_tab

WHERE estkz = 'F' AND

pstyp = 9 and

matnr = space AND

arsnr = space AND

packno NE space AND

loekz = space.

  • select PR assignments

SELECT * FROM ebkn INTO TABLE ebkn_tab FOR ALL ENTRIES IN eban_tab

WHERE banfn = eban_tab-banfn AND

bnfpo = eban_tab-bnfpo AND

aufnr = space AND

loekz = space.

SORT ebkn_tab.

LOOP AT ebkn_tab INTO ls_ebkn.

lv_menge = ls_ebkn-menge.

LOOP AT ebkn_tab INTO ls_ebkn_2

WHERE banfn EQ ls_ebkn-banfn

AND bnfpo EQ ls_ebkn-bnfpo

AND zebkn NE ls_ebkn-zebkn.

  • find more assignments -> sum. the MENGE

DELETE ebkn_tab INDEX sy-tabix.

add ls_ebkn_2-menge to lv_menge.

APPEND ls_ebkn TO ebkn_del.

APPEND ls_ebkn_2 TO ebkn_del.

ENDLOOP.

if lv_menge = 1.

  • the EBKN is still in order, take back inserted ebkn_del

delete ebkn_del where banfn = ls_ebkn-banfn

and bnfpo = ls_ebkn-bnfpo.

endif.

ENDLOOP.

CHECK NOT ebkn_del[] IS INITIAL.

  • select service activity which has double assignments

SELECT * FROM afvc INTO TABLE afvc_tab FOR ALL ENTRIES IN ebkn_del

WHERE aufpl = ebkn_del-aufpl AND

aplzl = ebkn_del-aplzl.

SORT afvc_tab.

IF NOT testrun IS INITIAL.

WRITE: / 'Network ', 'Activity', 'BANFNR', 'BANFPO'.

LOOP AT afvc_tab.

SELECT SINGLE aufnr FROM afko INTO aufnr

WHERE aufpl = afvc_tab-aufpl.

WRITE: / aufnr, afvc_tab-vornr, afvc_tab-banfn, afvc_tab-bnfpo

ENDLOOP.

skip.

WRITE:/ 'BANFNR ', 'BANFPO', 'ZEBKN', 'MENGE ',

'G/L account'.

LOOP AT ebkn_del.

WRITE: / ebkn_del-banfn UNDER 'BANFNR ',

ebkn_del-bnfpo UNDER 'BANFPO',

ebkn_del-zebkn UNDER 'ZEBKN',

ebkn_del-menge UNDER 'MENGE ',

ebkn_del-sakto UNDER 'G/L account'.

ENDLOOP.

skip.

WRITE:/ 'Purchase Reqisitions to be deleted:'.

LOOP AT ebkn_del WHERE sakto IS INITIAL AND

menge = '1'.

write: / ebkn_del-banfn, ebkn_del-bnfpo, ebkn_del-zebkn.

ENDLOOP.

ELSE.

  • update

LOOP AT ebkn_del WHERE sakto IS INITIAL AND

menge = '1'.

write: / ebkn_del-banfn, ebkn_del-bnfpo, ebkn_del-zebkn.

ENDLOOP.

ELSE.

  • update

LOOP AT ebkn_del WHERE sakto IS INITIAL AND

menge = '1'.

UPDATE ebkn SET loekz = 'X' WHERE banfn = ebkn_del-banfn

AND bnfpo = ebkn_del-bnfpo

and sakto = space.

ENDLOOP.

ENDIF.

Thanks a lot and kind regards,

Enrique

Edited by: Enrique Sosa Dominguez on Nov 27, 2009 2:54 PM

Edited by: Enrique Sosa Dominguez on Nov 27, 2009 2:55 PM

Edited by: Enrique Sosa Dominguez on Nov 27, 2009 2:56 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Can you please let us know what do you mean by duplicate network activities? Also give some more details about the business transactions you did in the system.

Regards,

Ajinkya