cancel
Showing results for 
Search instead for 
Did you mean: 

JCO - BAPI_REQUISITION_CHANGE - TEXTs

Former Member
0 Kudos

Hello,

I try to update a requisition item with the corresponding texts

( Item text, Item note, delivery text, PO text) via JCO.

Changing of the texts works, as well as appending texts, but DELETING

of the texts is not working....

To delete the texts I iterate through the REQUISITION_TEXT_NEW table and delete the rows with a certain TEXT_ID (e.g. B01).... but unfortunately that does not work.

I would appreciate any hint!! Thanks in advance!!!

Warm Regards,

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Christian!

What ABAP functionality are you calling via JCo from within your Java application? A BAPI, another function module, something customer developed? Does it have a implicit COMMIT WORK inside?

Regards,

Thomas

Former Member
0 Kudos

Hi Thomas,

I'm calling BAPI_REQUISITION_CHANGE (standard sap BAPI). I' don't know if this BAPI has an implicit COMMIT WORK inside....

What I can tell you is:

- Changing texts works fine

- Adding new text also

- DELETING texts works not correct

What I do is:

- get the OLDtable:

function.getTableParameterList().getTable("REQUISITION_TEXT_OLD")

- copy values from the OLD table to the NEW

- delete the rows which are not needed anymore:

function.getTableParameterList().getTable("REQUISITION_TEXT_NEW").deleteRow()

Then the BAPI_REQUISITION_CHANGE and BAPI_TRANSACTION_COMMIT is called:


JCO.Function commit = getBapiFunction("BAPI_TRANSACTION_COMMIT");
commit.getImportParameterList().setValue("X", "WAIT");
client.execute(commit);

What am I doing wrong? Why the texts can not be deleted??

Thanks for any advice!!!!

Best regards,

Christian

Former Member
0 Kudos

Hi Christian,

Do you get any messages coming back in your RETURN table?

Have you tried running the function module directly on the SAP system via transaction SE37?

Have a search for the FBGENDAT functionality offered by SAP - this allows you to capture in the backend SAP system the exact data you are passing with your call to the function module. It may be some part of your data is incorrect or inconsistent and is stopping the texts from being deleted.

Gareth.

former_member202208
Active Participant
0 Kudos

Hi,

When you are copying Values from Old table to New table and then u are passing new table to R/3 for processing, then it seems that the BAPI would be flushing out the old data and populating new data with respect to the Old Document #.

Did you check the function module thru SE37?

If its a Custom/Wrapper function, check with the developer, U can always trace the flow with him.

Thanks,

Answers (0)