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: 

BADI_SD_REV_REC_PODEV

p244500
Active Contributor
0 Kudos

Hi,

I need to used this BADI_SD_REV_REC_PODEV for SAP revenue post block and released. It has to trigger base on user status in Sales order header . but i'm unable to get the user status using this badi while save the VA01/VA02. ( I can get user status manually using STATUS_TEXT_EDIT, but its provide only the save data, not run time.

I have follow the SAP note 1125456 and 1468536. If anyone know about it kindly let me know.

I do have bellow information only unable to find user status data.


IS_VBAK.............Sales document: Header data
IS_VBAP.............Sales document: Item data
IS_VBKD.............Sales document: Business data
IS_VEDA_HEAD........Sales document: Contract data (header)
IS_VEDA.............Sales document: Contract data (item)
IS_VBUK.............Sales document: Header status
IS_VBUP.............Sales document: item status

Table:
IT_VBEP.............Sales document: Schedule lines

Thank you.

Regards,

Nawa

2 REPLIES 2

Former Member
0 Kudos

Hi Nawa,

Please check the function module STATUS_READ by inputting the OBJNR value (e.g. VBAP-OBJNR). Refer table: JEST (User Status and System Status).

Also check FM: STATUS_OBJECT_READ.

The user status is checked in the BAdI. A status profile must be maintained in the item category of the order item. Status profile can be maintained using transaction BS02. Please check SAP Note 910554. Also check function module SD_REV_REC_COLLECT (Refer SAP Notes 780993 and 781192).

Regards,

Neenu Jose

p244500
Active Contributor
0 Kudos

Hi Neenu,

Thank you for the answer , I found the way how to get the status, have to use FM : STATUS_TEXT_EDIT. With this have to pass all the value except " BYPASS_BUFFER". It provide the current status .


DATA: lv_anw_stat_existing TYPE xfeld, lv_e_stsma TYPE jsto-stsma, lv_line TYPE bsvx-sttxt, lv_user_line TYPE bsvx-sttxt, lv_stonr TYPE tj30-stonr. CALL FUNCTION 'STATUS_TEXT_EDIT' EXPORTING client = sy-mandt flg_user_stat = 'X' objnr = 'VB0000XXXXXXX' "object number VBAK-OBJNR only_active = 'X' spras = sy-langu * BYPASS_BUFFER = ' ' importing anw_stat_existing = lv_anw_stat_existing e_stsma = lv_e_stsma line = lv_line user_line = lv_user_line stonr = lv_stonr EXCEPTIONS object_not_found = 1 OTHERS = 2



Regards,

Nawa