0

How to upload PM order confirmation actual data and post goods movement using BAPI in SAP ?

I tried to use a lot of BAPI but it didn't work like this: MAP2E_RIWOL_TO_ALM_ORDER_OLIST , BAPI_ALM_ORDER_MAINTAIN , BAPI_PRODORDCONF_GET_TT_PROP

These are the steps that the user follows in entering the data using (T-Code IW41 ) , 1

2

3

4

5

I'm in need an appropriate BAPI for these steps.

A-G
  • 1
  • 1

1 Answers1

1

To post Time confirmations use 'BAPI_ALM_CONF_CREATE'

To post goods movement , is a loaded question, but if we assume a basic MM goods issue to order , use 'BAPI_GOODSMVT_CREATE' use Goods movement code of 03 and a movement type 261. gm_code = '03'.
goodmvt_item-move_type = '261'

The Object LIST is maintained via the ORDER.
see BAPI_ALM_ORDER_MAINTAIN.
The object list is part of this function. Example for you test program to post confirmations.

" map_timeconf example using variable names similar to afru

DATA: ls_timetickets TYPE bapi_alm_timeconfirmation.

ls_timetickets-orderid = i_aufnr.
ls_timetickets-operation = i_vornr.
ls_timetickets-sub_oper = i_uvorn.


IF is_timec_up-split IS NOT INITIAL.
  ls_timetickets-capa_category = '002'. "Person
  ls_timetickets-split = is_timec_up-split.
ENDIF.
ls_timetickets-fin_conf = is_timec_up-aueru.
ls_timetickets-clear_res = is_timec_up-ausor.

ls_timetickets-conf_text = is_timec_up-ltxa1.
ls_timetickets-plant     = is_timec_up-werks.
ls_timetickets-work_cntr = is_timec_up-arbpl.

ls_timetickets-act_work_2 = is_timec_up-ismnw.
ls_timetickets-un_work = is_timec_up-ismne.
ls_timetickets-rem_work = is_timec_up-ofmnw.
ls_timetickets-un_rem_wrk = is_timec_up-ofmne.
ls_timetickets-actual_dur = is_timec_up-idaur.
ls_timetickets-un_act_dur = is_timec_up-idaue.
ls_timetickets-exec_start_date = is_timec_up-isdd.
ls_timetickets-exec_start_time = is_timec_up-isdz.
ls_timetickets-exec_fin_date = is_timec_up-iedd.
ls_timetickets-exec_fin_time = is_timec_up-iedz.
ls_timetickets-pers_no = is_timec_up-pernr.

ls_timetickets-act_type = """"" <<<<< is important

ls_timetickets-calc_motive = is_timec_up-bemot.


ls_timetickets-ex_created_by = is_timec_up-ernam.
ls_timetickets-ex_created_date = is_timec_up-ersda.
ls_timetickets-dev_reason = is_timec_up-grund.

ls_timetickets-postg_date =   !!!!  sy-datum
                                  

APPEND ls_timetickets TO lt_timetickets.



CALL FUNCTION 'BAPI_ALM_CONF_CREATE'
  EXPORTING
    post_wrong_entries = ' '
    testrun            = i_testrun
  IMPORTING
    return             = ls_return
  TABLES
    timetickets        = lt_timetickets
    detail_return      = lt_alm_return.


COMMIT WORK. "! You can only do 1 at a time
           " indeed you may need a new session each time.
phil soady
  • 11,043
  • 5
  • 50
  • 95
  • +1, but why is asking how to post a goods movement a [loaded question](https://en.wikipedia.org/wiki/Loaded_question)? – Philipp May 11 '23 at 11:39
  • Unfortunately this solution doesn't work with me , I attached pictures showing the steps that the user follows in entering the data using (T-Code IW41 ) thanx for the reply. – A-G May 11 '23 at 12:39
  • @A-G "doesn't work with me" isn't useful feedback to give to someone who tries to help you. Imagine you developed a software and the customer would say "doesn't work for me, I won't pay" and nothing else. How would you feel about that? So please tell us: **why** doesn't it work for you? Do you get an error message? Doesn't it do everything you need? – Philipp May 12 '23 at 08:20
  • @philipp when the goods issue involves Warehouse Mgt. Different steps are required. Eg Transfer orders . A-G didnt state whether is was basic MM, so we assume it is. Eg L_TO_CREATE_SINGLE – phil soady May 12 '23 at 20:19
  • What did you try. Im quietly confident that the FUNCTION can be used to post time confirmations for PM Orders. Share the error messages... – phil soady May 12 '23 at 20:32
  • Sorry for not clarifying my response ,just want to state that's not working with me however here you go a complete explanation of the situation: I tried this solution through se37 I using TEST SEQUENCES ,insert BAPI_ALM_CONF_CREATE & BAPI_TRANSACTION_commit and Sand filled in all the required fields. I did not find the data by viewing it on se43 and they did not give me any error message , I think that the user must choose the object list and then mark the check box of 'Processing indicator' then write function location before saving. Do you have a suitable BAPI to enter the object list. – A-G May 12 '23 at 23:50
  • Note, I am new in the ABAP field , and I am not familiar with all the function of this language, and for this I resorted to stackoverflow community to help me, and thanks again for trying to helping me sort it out :) – A-G May 12 '23 at 23:50
  • Ive added Object list, maint to answer. I recommend you a test program rather that just trying Se37 test calls due to commit handling. – phil soady May 13 '23 at 11:40
  • if your test program isnt working, then we can help with that. – phil soady May 13 '23 at 11:53
  • @phil soady Thanks for the code but .The test program give me error message "Please Fill Functional loc. from object list" – A-G May 15 '23 at 10:10
  • @A-G code and error message details. Now we are talking about something other than time conf. Object list has nothing to do with Timeconf. A new question is appropriate – phil soady May 15 '23 at 20:05