cancel
Showing results for 
Search instead for 
Did you mean: 

DLFL object not visible in validation OPSI

Former Member
0 Kudos


Hi,

when NWA deletion flag is set (DLFL) this is not visible in validation(OPSI). why is not visible in validation once i set in the current transaction?

where should i find that?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi..

i have tried the issue you mentioned in the system i am working in and the same applies. (in fact you can activate the trace function of GGB0-validation just to make sure what the system is doing..). In the test case i have used i have 1 network with 2 activities. One of the activities had the status DLFL. For this specific activity the trace passed like it never existed.

I can consider it as a standard behaviour of sap for DLFL objects. (like when you have costs associated with a DLFL object eg: wbs or nwa, then CJI3 does not present them at all).

I could only find the sap note 2037176 - Validation occurs on WBS with DLFL status in CJ20n.  where (not) directly SAP mentions that "...However, the validation is taking place for the WBS in 'DLFL' status. This is an error."  and i think that this should be the standard behaviour for all DLFL objects.

Besides that i can only agree with the rest of the people considering what is your need to validate a DLFL object. (something that is meant to be deleted)


Hope it helps somehow

Panagiotis

Former Member
0 Kudos

I want to stop DLFLing itself. i want to validate if there is cost associated with it. and stop user there, if there is cost.

on functional side it has become huge efforts; once the user sets DLFL on the object which has cost; it is affecting and fucntional team has to undo everytime.  we are trying to find a solution.

Answers (3)

Answers (3)

Former Member
0 Kudos

there should be a temporary table/memory where i get this info in validation? i will search in forum; but if any of you know please let me know.

Former Member
Former Member
0 Kudos

These notes are not valid in my case Tushar. thanks for reply.

Paulo_Vitoriano
Active Contributor
0 Kudos

What about the option we have discussed last time?

Former Member
0 Kudos

Hi Paulo,

That solution is not defferenciating between physical delete(Trash Can)  and Deletion flag set.

for both it has the value is SAP_ACTVT = '06'.

Business wants to validating something when Deletion flag is set. and Do nothing when physical delete(Trash Can)

sammar81
Employee
Employee
0 Kudos

Hi Prema

Is it getting captured in JCDS before save? though I doubt it..

Regards

Sammar

0 Kudos

Hi

once more ...maybe you could check on the user exit CNEX0002 ( CNEX0002 for creating authorization check logic - Product Lifecycle Management - SCN Wiki)

and specifically point EXIT_SAPLCNAU_004 with the logic when SAP_ACTVT = '02' then check status of the network activity before and after the change.

For this reason you can use function module STATUS_TEXT_EDIT. First time do not set BYPASS_BUFFER-> the system will read the status as was set by user on screen, and if it contains DLFL status then check the same function once more  by setting BYPASS_BUFFER = 'x' (thus checking the status of the activity in the database).


CALL FUNCTION 'STATUS_TEXT_EDIT'

         EXPORTING

           client        = sy-mandt

           flg_user_stat = 'X'

           objnr         = SAP_AFVGD-objnr

           only_active   = 'X'

           spras         = sy-langu

         IMPORTING

           line     = sys_status_new.

       if sys_status_new cs 'DLFL'.

               CALL FUNCTION 'STATUS_TEXT_EDIT'

                       EXPORTING

                         client        = sy-mandt

                         flg_user_stat = 'X'

                         objnr         = SAP_AFVGD-objnr

                         only_active   = 'X'

                         spras         = sy-langu

                         BYPASS_BUFFER = 'x'

                       IMPORTING

                         line     = sys_status_old.

         .....

After that point you need to check if sys_status_old does not contain 'DLFL'.

(that means the user actually tried to set DLFL status) and at this point you need to perform another select in table COEP to check if activity contains actual values. If this is the case then you need to disallow users from doing this action.

Hope it helps.(most likely you might need the help of an ABAPer unless you are efficient in programming)

Kind Regards

Panagiotis

Former Member
0 Kudos

Thank you Panagiotis,

I tried your solution but it is not stopping the user from DLFL.

when user cliecks on Edit->Status-> Deletion Flag->set

system has SAP_ACTVT = 02 and then 06; in both status the FM doesnt get me the current value DLFL; but after that; when user click somewhre else; then it will check the value before going away from that SAP_AFVGD-objnr (current cursor) at this time i have what i want but system is not stopping, i have set sap_x_actvt = ' '.  but system doesnt stop here.  what should i do stop user from DLFL at this point.

i have below code as suggested by you.

 

sap_x_actvt = 'X'.
data: sys_status_new like BSVX-STTXT.
data: sys_status_old like BSVX-STTXT.


IF ( SAP_ACTVT = '06' OR SAP_ACTVT = '02').    "Changing

CALL FUNCTION 'STATUS_TEXT_EDIT'
  
EXPORTING
*   CLIENT                  = SY-MANDT
   FLG_USER_STAT           
= 'X'
    OBJNR                   
= SAP_AFVGD-objnr
   ONLY_ACTIVE             
= 'X'
    SPRAS                   
= sy-langu
*   BYPASS_BUFFER           = ' '
 
IMPORTING
*   ANW_STAT_EXISTING       =
*   E_STSMA                 =
   
LINE                    = sys_status_new
*   USER_LINE               =
*   STONR                   =
* EXCEPTIONS
*   OBJECT_NOT_FOUND        = 1
*   OTHERS                  = 2
          
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.


 
if sys_status_new cs 'DLFL'.
CALL FUNCTION 'STATUS_TEXT_EDIT'
  
EXPORTING
*   CLIENT                  = SY-MANDT
   FLG_USER_STAT           
= 'X'
    OBJNR                   
= SAP_AFVGD-objnr
   ONLY_ACTIVE             
= 'X'
    SPRAS                   
= sy-langu
   BYPASS_BUFFER           
= 'X'
 
IMPORTING
*   ANW_STAT_EXISTING       =
*   E_STSMA                 =
   
LINE                    = sys_status_old
*   USER_LINE               =
*   STONR                   =
* EXCEPTIONS
*   OBJECT_NOT_FOUND        = 1
*   OTHERS                  = 2
          
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
 

if NOT ( sys_status_old CS 'DLFL' ).
     sap_x_actvt 
= ' '.
 
endif.

 

endif.
endif

.

0 Kudos

Hi once more...

maybe i was thinking a little more complex than i should...(it happens if you are dealing with sap)

May i propose another approach in the user exit for activities...

SAP_X_ACTVT = 'X'.

tables : coep.

if sap_actvt = '06'.

  select single * from coep where objnr = SAP_AFVGD-objnr and....

  if sy-subrc = 0.

    clear : SAP_X_ACTVT.

    SAP_X_ACTVT = ' '.

  endif.

endif.

i understand that 06 is common to delete button and DLFL status.

If actual costs exist and user presses the delete button then the system's default response is to issue an error (with this extra control it will issue 2 errors)

If actual costs exist and user changes the status to DLFL then the system will issue an error and will perform the control that you want. (system's default response without this control would be to set the DLFL status)...

Try it and let us know if it helps...

Kind Regards

Panagiotis

Former Member
0 Kudos

thanks panagiotis,

i whould like to know when does system differenciate between deletion flag set  and thrashcan delete; i think for both it is sap_actvt = '06'? this solution is not working for me.

Former Member
0 Kudos

Hi,

In addition to what Sammar has suggested. I also want to know the business process required here. I can sense that you are looking for system status for NWA having deletion flag set on it. Isn't it.? and the same you want to incorporate in your validation using system status of NWA.

I may be wrong. But you need to clarify your process.

Regards,

Amit

Former Member
0 Kudos

Amit,

I'm trying to stop user to set Deletion flag (not Thrash Can)  if there is cost assigned to that NWA.

sammar81
Employee
Employee
0 Kudos

Hi Prema,

What's the rationale of validating the DLFL active NWA? It's as good as non-existing for any operational purposes.

You activate DLFL when you want to archive a NWA or don't want to use it any further in the Project.

Regards

Sammar

Former Member
0 Kudos

Yes, that is correct. but i want stop user DLFLing on condition.