Hello and thank you in advance for your help.
I^ve created an ABAP program in order to create a batch Input that could modify the Status TRAI for an activity.
I upload a file with a list of project, activity and a X to validate or no the status TRAI.
For example, in the file uploaded we have:
C1/4563798/020 0003 X
1- I execute my program to create the batch input.
2- I process my Batch Input.
The batch Input launch the transaction CJ20.
We select the good WBS but sometimes it doesn't select the good activities.
In fact when we have selected our WBS:
We have access to this screen:
line 1 A blank line
line 2 C1/4563798/020 0001 X
line 3 C1/4563798/020 0002 X
line 4 C1/4563798/020 0003 X
In my program i select the line 4 in order to open the activity 0003.
Unhappily i have found some project like that:
line 1 A blank line
line 2 C1/4563798/020 0001 X
line 3 C1/4563798/020 0003 X
line 4 C1/4563798/020 0004 X
So when i'm trying to select the line 4 to have activity 003, i do not have the activity 0003 but the activity 0004.
Can you help me please finding an other solution:
1- I can may be check the value of the activity that i've selected but i don't know how to do that.
2- Or find an other transaction in wich i could access immediately to my activities.
CJ20 allows to access project and WBS
CN22 allows to access Network.
But for activities ?????
Thank you very much for your help
-
This is a part of my program:
PERFORM BATCH_CALL_SCREEN USING: 'SAPLCJTR' '108'.
PERFORM BATCH_FILL_FIELDS USING: 'TCJ41-ALL_ACT' 'X'.
PERFORM BATCH_FILL_FIELDS USING: 'proj-pspid' ''.
PERFORM BATCH_FILL_FIELDS USING: 'PRPS-POSID' PROJN.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' 'STTR'.
In CJ20 i select my WBS and change structure planning. I go on the second mitre "Basic Dates
PERFORM BATCH_CALL_SCREEN USING: 'SAPLCJTR' '230'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_CURSOR' W_INDEX.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' 'PICK'.
I select the line which contains the acticity to change
PERFORM BATCH_CALL_SCREEN USING: 'SAPLCONW' '1000'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' 'STAS'.
I go on the screen to change status
PERFORM BATCH_CALL_SCREEN USING: 'SAPLBSVA' '0300'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' 'DIRI'.
I open the window to enter the status TRAI
PERFORM BATCH_CALL_SCREEN USING: 'SAPLBSVA' '0882'.
IF STAT = 'X' OR STAT = 'x'.
PERFORM BATCH_FILL_FIELDS USING: 'JESTD-ETX04' 'TRAI'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' '/00'.
I put the status of my Activity in TRAI
ELSE.
PERFORM BATCH_FILL_FIELDS USING: 'JESTD-ETX04' 'TRAI'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' 'LOES'.
I cancel the status TRAI of my Activity
ENDIF.
PERFORM BATCH_CALL_SCREEN USING: 'SAPLBSVA' '0300'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' '=BACK'.
PERFORM BATCH_CALL_SCREEN USING: 'SAPLCONW' '1000'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' '=BACK'.
PERFORM BATCH_CALL_SCREEN USING: 'SAPLCJTR' '0230'.
PERFORM BATCH_FILL_FIELDS USING: 'BDC_OKCODE' '=BUTV'.
I save my project changed.