SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to reverse closure (completion) of disconnection document?

Former Member
0 Kudos
931

I have a requirement to reverse the completion of disconnection documents through a BDC Program (of transaction EC86). The document contains 5 line items in Disconnection Activity as follows:

1. Disconnection Order

2. Disconnection Entry

3. Reconnection Order

4. Reconnection Entry

5. Completion

Since reversing requires scrolling down to the 5th line item, this poses as a significant challenge. Other posts suggest using the OK_CODE = '=P+' to simulate a page down or scroll, but it doesn't seem to be working primarily because the system ends up giving the error:

Function Code can not be selected.


More precisely, the system can't seem to find the table to scroll on to it seems. I've tried all combinations of BDC_CURSOR on EENO_DYNP-ZEILE(01/02) or EDISCD-ACTTYPTEXT(01/02) but it doesn't seem to be working.

This is my routine that performs the BDC:

perform bdc_dynpro using 'SAPLEC85' '0100'.
perform bdc_field using 'BDC_CURSOR'
                               'EDISCD-DISCNO'.
perform bdc_field using 'EDISCD-DISCNO'
                               PA_DISCNO.
perform bdc_field using 'BDC_OKCODE'
                               '/00'.

perform bdc_dynpro using 'SAPLES34' '0200'.
perform bdc_field using 'BDC_OKCODE'
                               '/00'.
perform bdc_field using 'BDC_CURSOR'
                               'EENO_DYNP-ZEILE(01)'.
perform bdc_field using 'BDC_OKCODE'
                               '=P++'.

perform bdc_dynpro using 'SAPLES34' '0200'.
perform bdc_field using 'BDC_CURSOR'
                               'EENO_DYNP-ZEILE(02)'.
*                              'EDISCD-ACTTYPTEXT(02)'.
perform bdc_field using 'BDC_OKCODE'
                               '=PICK'.

perform bdc_dynpro using 'SAPLSPO1' '0100'.
perform bdc_field using 'BDC_OKCODE'
                               '=YES'.
perform bdc_dynpro using 'SAPLES34' '0200'.
perform bdc_field using 'BDC_OKCODE'
                               '=SAVE'.
perform bdc_field using 'EDISCDOCS-BILLREL'
                               'X'.

perform bdc_transaction using 'EC86'.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
397

I managed to do so wih the help of the following function module: ISU_DB_EDCN_UPDATE.

View solution in original post

1 REPLY 1

Former Member
0 Kudos
398

I managed to do so wih the help of the following function module: ISU_DB_EDCN_UPDATE.