Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

A Batch Input to modify status TRAI of an activity

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

JayR
Participant
0 Kudos

Hi Loic,

Goto CN22 -> Enter Network No -> press F7

you can able to the see the activities now. If i am not matching your requirement. give me ur requirement in detail. I will do recording for u

Jai

2 REPLIES 2

JayR
Participant
0 Kudos

Hi Loic,

Goto CN22 -> Enter Network No -> press F7

you can able to the see the activities now. If i am not matching your requirement. give me ur requirement in detail. I will do recording for u

Jai

Former Member
0 Kudos

Thank you very much, when i access to the activities with CN22 and F7, i could now position my cursor in the good activities thanks to:

- the Menu "Edit"

- "Object"

- "Position".

I can now enter my activities and modify this one.

Thanks a lot.