cancel
Showing results for 
Search instead for 
Did you mean: 

Deletion table

Former Member
0 Kudos

Hi Gurus

1. Kindly provide the table details to get the following details

User who set the deletion indicator

Date & Time when the deletion indicator is set

2. Is there any function module to change the document status.

Regards

Raja

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188883
Active Contributor
0 Kudos

Hi Raja,

1. Kindly provide the table details to get the following details

User who set the deletion indicator .Date & Time when the deletion indicator is set

You can check BAPI BAPI_DOCUMENT_DELETE for deletion indication. Table details will be mentioned in this.

2. Is there any function module to change the document status.

You can set the document status with this BAPI BAPI_DOCUMENT_SETSTATUS

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Deepak Kori,

Thanks for your reply.

Still i am unable to meet the requirement.

1. I can't find the table details in BAPI ---> BAPI_DOCUMENT_DELETE.

2. I have given the following inputs in BAPI --> BAPI_DOCUMENT_SETSTATUS and executed it but the document status is not changed.

DOCUMENTTYPE 001

DOCUMENTNUMBER 1196

DOCUMENTPART 000

DOCUMENTVERSION 01

STATUSEXTERN 01 (current status)

STATUSINTERN 02 (New status)

STATUSLOG

Please correct me if i am wrong.

Regards

Raja

Former Member
0 Kudos

Hi Gurus

Can you please help me to solve this issue.

Regards

Raja

former_member188883
Active Contributor
0 Kudos

Hi Raja,

Set Document Status

Functionality

You use this method to set a new status for a document. You can use field STATUSLOG to make an entry in the status log field.

Notes

The system specifies the internal or external status. The internal status is the status in the database. The external status is what the user sees on the user interface, and depends on the logon language.

If the internal status is specified, this has priority. Otherwise, the system reads the internal status that corresponds to the external status key.

Example

Example program

*************

**Define variables required

************

DATA: lf_doctype LIKE bapi_doc_draw-documenttype,

lf_docnumber LIKE bapi_doc_draw-documentnumber,

lf_docpart LIKE bapi_doc_draw-documentpart,

lf_docversion LIKE bapi_doc_draw-documentversion,

lf_statusextern LIKE bapi_doc_draw-statusextern,

lf_statusintern LIKE bapi_doc_draw-statusintern,

lf_statuslog LIKE bapi_doc_draw-statuslog.

    • BAPI return structure

DATA: ls_return LIKE bapiret2.

********************************************

    • Assign document data

    • The status of this document is to be changed

******************************************

lf_docnumber = 'DOKUMENTNUMMER'.

lf_doctype = 'DRW'.

lf_docversion = '00'.

lf_docpart = '000'.

lf_statusintern = 'AR'.

**********************************

**Call BAPI

**********************************

CALL FUNCTION 'BAPI_DOCUMENT_SETSTATUS'

EXPORTING: documenttype = lf_doctype

documentnumber = lf_docnumber

documentpart = lf_docpart

documentversion = lf_docversion

statusextern = lf_statusextern

statusintern = lf_statusintern

statuslog = lf_statuslog

IMPORTING: return = ls_return.

    • Any errors?

IF ls_return-type CA 'EA'.

ROLLBACK WORK.

MESSAGE ID '26' TYPE 'I' NUMBER '000'

WITH ls_return-message.

ELSE.

COMMIT WORK.

ENDIF.

Regards,

Deepak Kori