Application Development and Automation 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: 
Read only

Call Transaction ME22 USING BDCDATA

Former Member
0 Likes
1,464

Hi All,

I am looping through different PO's ,filling the BDCDATA table for them and calling Transaction ME22 for each PO for changing them.The data to be changed is supplied in BDCDATA.

Now, Different Output types are assigned to different PO's.One for fax, other for ALE, then for Print.

I want that when my PO is changed using Call transaction programatically it deletes all the Yellow Output Types before save OKCODE.So that Print or ALE etc is not triggred when my program does call transaction.

Currently i am filling the BDCDATA table to delete the first entry On Messages Screen, which will always be yellow , if an output type is attached to a PO.

Now if there are few processed output types,lets say

Yellow NEXX

Green NEXX

Yellow NEU

GREEN NEU

Then the placement Of yellow output type is as above. This Placement is decided during run time.But because i want to delete Yellow once ,is there any way todetermine them prior to calling call transaction so that i can fill BDCDATA table to delete Yellow entries?

Please suggest Ideas, I just want that pirnt or ALE etc output types should not get triggered when CALL TRANSACTION ME22 USING BDCDATA is executed in my program.

Thanks,

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,240

Hi,

I would suggest to go for a BAPI/FM instead of using BDC for ME22.

Best regards,

Prashant

8 REPLIES 8
Read only

Former Member
0 Likes
1,241

Hi,

I would suggest to go for a BAPI/FM instead of using BDC for ME22.

Best regards,

Prashant

Read only

0 Likes
1,240

Hi Prashant,

The program uses CALL transaction ,am supposed to delete the Yellow Status before every record is saved.I dont think i will be allowed to change existing code.

Thanks,

Yogeeta

Read only

0 Likes
1,240

Hi Chenna,

If i use BAPI_PO_CHANGE , then no output type will be triggered?Ok.Ill try implementing if they allow me to change existing functionality.

Can you post any link on the above code an i have never worked on BAPI?

Thanks,

Yogeeta

Read only

0 Likes
1,240
Read only

ThomasZloch
Active Contributor
0 Likes
1,240

Maybe you can work with a functional consultant on avoiding the yellow outputs altogether. It's been a long time ago for me, but there might be a way to configure output determination so that no new output type is being assigned when a PO is being changed by your process.

You wouldn't have to delete anything if this works.

Thomas

Read only

0 Likes
1,240

Hi Thomas,

Its true that there is a process to attach Output type.Its done in config per Vendor and purchase organisation combination.We cannot delete that as if somone wans to manually change the PO then Those output types should be triggered.Only when i change the PO using CALL TRANSACTION it should not trigger any output type.

Regards,

Yogeeta

Read only

0 Likes
1,240

There might be user exits in output determination that allow you to check for certain conditions to distinguish between manual change and your process, maybe via SY-REPID, SY-BINPT or an ABAP memory parameter. Maybe have a look in that direction.

I think it could be difficult to simulate output determination in advance so that you know which lines to delete on that screen.

Thomas

Read only

Former Member
0 Likes
1,240

for this case use bapi BAPI_PO_CHANGE to chnage the data, this is not screen level its not trigger the out put type...