cancel
Showing results for 
Search instead for 
Did you mean: 

PO Item Detail, Service lines should not be deleted for which SES approved

Former Member
0 Kudos

Hello Friends,

                      I am facing a proble, and I have searched for the same in the forum, but have not got any help hence forth posting.

My issue is with the PO of the Services (Account Assignment -K and Item Category-D).

in the Service PO in the item detail part, I have many services, and for few of them I have Service entry sheet processed and approved also.

now the user is being able to delet these lines in the PO.

I want that the users should not able to delete the line items for which Service Entry sheets have been approved.

but he should be allowed to delete the line items for which Service Entry sheet has not been approved.

Please help.

Thanks and Regards

Yawar Khan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Yawar,

It can not be controlled by configuration but it can be easily controlled by using BAdI/Exit where you can put the condition to raise a error message at the time of line item deletion if the SES is done.

Below BADI's can be used for same, get help if your abaper for the same. ME_PO_PROCES_CUST

Regards,

Anoop Singh

Former Member
0 Kudos

Hi Anoop,

                Thanks a lot for the Badi, I will Check and confirm back.

Regards,

Yawar Khan

Former Member
0 Kudos

Hi Anoop, Thanks a lot for the help,

One more thing required in the BADi, i need to check the Presence of Line item(EXTROW), in the item detail level in table ESLL.

can you please provide some help in this respect, as how to reach upto the line item at the Item Detail level from the Service Entry sheet no.

Thanks and Regards,

Yawar Khan

Former Member
0 Kudos

Hi Yawar,

you can go to ESSR table and get the package number (PACKNO) for your service PO and then go to ESLL table enter that package number then you will get another PACKNO for the service line items. there you will get the services line items for a main line.

Regards,
Anoop Singh

Former Member
0 Kudos

Hi Anoop,

                thanks a lot for your help,

I have already done all this but after putting the PACKNO second time in ESLL, then in which field can I find the Service line Item no.

because when I check the Field name for the service Line Item name in the PO, it gives EXTROW, for the second time when I am putting the Pack no the Field EXTROW is giving 00000

Thanks and Regards,

Yawar Khan

Former Member
0 Kudos

hi Yawar,

the first package number you get from essr table and then you enter it in ESLL table then in esll table you will get another package number for that entered packno....then again go back and use the package number in esll which will give you the service item details within that service line.

regard,

anoop singh

Former Member
0 Kudos

Hi Anoop,

               But with which Field I can Identify the Different Service Line Items.

Regards,

yawar

Former Member
0 Kudos

yes it is EXTROW to identify the different service line items

Regards,
Anoop

Former Member
0 Kudos

That is where I have confusion, EXTROW is showing 00000.

why is it so, and where I am wrong.

Regards,

Yawar

Former Member
0 Kudos

check for some other line items if it is coming correct or not for some other package number and sub-package number?

Regards,
Anoop Singh

BijayKumarBarik
Active Contributor
0 Kudos

Hi,

You need to go for enhancement for restricting service order edition with validation if service entry sheet created for your service order.

Discuss with intelligent ABAPer and go for development with getting data from EKKO and EKBE tables. EKKO-EBELN with PSTYP(Item Category in Purchasing Document) = '9' and Pass the EKPO-EBELN as input & fetch all the required records from EKBE table with BEWTP (Purchase Order History Category) = ' D(Lerf)”. Now on above data, you can validate for restricting service order edition by enhancement

Regards,

Biju K

Former Member
0 Kudos

Hi Biju/Anoop,

                         Thanks a lot for the help.

we have been able to achieve the object.

your comments were quite helpfull to us, but when we are doing SES, then with the SES Quantity, one field is getting updated, and we put in the check with that field.

Regards,

Yawar Khan

Former Member
0 Kudos

This message was moderated.

Answers (1)

Answers (1)

former_member218071
Active Contributor
0 Kudos

Hi,

Yes, system allows to delete the PO line items if there are SES. You need to plug this through BADi/Exit.

If one is deleting Service line item, then you can activate message SE368 to error.

Regards, Rakesh

Former Member
0 Kudos

Hi Rakesh,

                    Thanks a lot, but I am talking at the Item Detail Level.

Regards,

Yawar Khan

former_member218071
Active Contributor
0 Kudos

Hi Yawar,

I was having same issue in past, and below is SAP reply. And same applies for material POs too.

-------------------------------------

You cancel items in a purchase order by deleting them. Please note that an item may only be deleted if it is closed (that is to say, there is no outstanding quantity to be delivered or invoiced).

Items are regarded as closed if, for example:

· the ordered quantity (or more) has already been delivered

· the ordered quantity has been invoiced in full

· no related follow-on processes (such as reservations) are active in the system.

As you have already received the goods (accepted SES) and you do not book invoices, the deletion of the item shall have no effect. The procurement process has been completed.

If however you try to delete the item after GR but before invoice receipt, the procurement process is not complete, therefore an error  occurs.

Also note the item shall be marked as deleted, but not actually removed from the system, it shall still  be available for reporting.

In the External Service Management area, please, check the coding in the note 747920 to correct a program error in this context

- maybe the coding was not implemented correctly in your system

- (without the note it is possible to delete a service item for which an accepted service entry sheet exists but no invoice exists. With the correction on the note, the item can only be deleted if the invoice also exists).

Also, please, consider the information contained

under the notes 856359, 722704, 747920, 457511 and 842013.

As of release  470, BADI ME_PROCESS_PO_CUST can give you more liberty to place checks.

EXIT_SAPMM06E_012 also provide opportunity to place checks

-----------------------

Hope this helps .