2007 Jul 27 12:19 AM
Friends , I have problem :
I `m using the BAPI_SERVNOT_CREATE , the issue is that when I run a test on-line it works fine, creating a service notification with all the fields , but when the test is in background the function create the service notification incomplete , the values for short text, description and some others dissapears
Someone can help me in order to find a solution for this problem?
Regards
Friends , I have problem :
I `m using the BAPI_SERVNOT_CREATE , the issue is that when I run a test on-line it works fine, creating a service notification with all the fields , but when the test is in background the function create the service notification incomplete , the values for short text, description and some others dissapears
Someone can help me in order to find a solution for this problem?
Regards
2007 Jul 27 12:28 AM
Hi,
Can you paste your code.
If you are using COMMIT WORK then just increase the waiting time.
Regards,
Atish
2007 Jul 27 3:17 PM
Hi Atish: this is my code thanks
REPORT ztest5 .
DATA:
wa_eger LIKE v_eger,
wa_notifpartnr LIKE bapi2080_notpartnri,
wa_return LIKE bapiret2,
ls_number LIKE bapi2080_nothdre-notif_no,
ls_notifheader2 LIKE bapi2080_nothdre,
ls_notif_type LIKE bapi2080-notif_type VALUE 'SC',
ls_notifheader_export LIKE bapi2080_nothdre,
v_gpart LIKE fkkvkp-gpart VALUE '6000023039'.
DATA: lt_notifpartnr LIKE STANDARD TABLE OF bapi2080_notpartnri,
lt_notitem LIKE STANDARD TABLE OF bapi2080_notitemi,
lt_notifcaus LIKE STANDARD TABLE OF bapi2080_notcausi,
lt_notifactv LIKE STANDARD TABLE OF bapi2080_notactvi,
lt_key_relationships LIKE STANDARD TABLE OF bapi2080_notkeye,
lt_return LIKE STANDARD TABLE OF bapiret2,
lt_return2 LIKE STANDARD TABLE OF bapiret2.
DATA BEGIN OF lt_notifheader OCCURS 0.
INCLUDE STRUCTURE bapi2080_nothdri.
DATA END OF lt_notifheader.
DATA BEGIN OF lt_notiftask OCCURS 0.
INCLUDE STRUCTURE bapi2080_nottaski.
DATA END OF lt_notiftask.
DATA BEGIN OF lt_longtexts OCCURS 0.
INCLUDE STRUCTURE bapi2080_notfulltxti.
DATA END OF lt_longtexts.
DATA BEGIN OF lt_return3 OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA END OF lt_return3.
CONSTANTS: c_codegroup LIKE lt_notifheader-code_group VALUE 'COBROS',
c_coding LIKE lt_notifheader-coding VALUE '0001'.
wa_eger-equnr = '000000009000020050'.
lt_notifheader-refobjecttype = 'BUS2080'.
lt_notifheader-equipment = wa_eger-equnr.
lt_notifheader-short_text = 'TEST'.
lt_notifheader-priority = '2'.
lt_notifheader-code_group = c_codegroup.
lt_notifheader-coding = c_coding.
APPEND lt_notifheader.
*
wa_notifpartnr-partn_role = 'AG'.
wa_notifpartnr-partner = v_gpart.
APPEND wa_notifpartnr TO lt_notifpartnr.
CLEAR wa_notifpartnr.
*
CALL FUNCTION 'BAPI_SERVNOT_CREATE'
EXPORTING
notif_type = ls_notif_type
notifheader = lt_notifheader
task_determination = ' '
IMPORTING
notifheader_export = ls_notifheader_export
TABLES
notitem = lt_notitem
notifcaus = lt_notifcaus
notifactv = lt_notifactv
notiftask = lt_notiftask
notifpartnr = lt_notifpartnr
longtexts = lt_longtexts
key_relationships = lt_key_relationships
return = lt_return.
IF NOT lt_return IS INITIAL.
READ TABLE lt_return INTO wa_return INDEX 1.
MESSAGE e899(mm) WITH text-004 wa_return-message.
ENDIF.
CALL FUNCTION 'BAPI_SERVNOT_SAVE'
EXPORTING
number = ls_number
IMPORTING
notifheader = ls_notifheader2
TABLES
return = lt_return2.
IF NOT lt_return2 IS INITIAL.
READ TABLE lt_return2 INTO wa_return INDEX 1.
MESSAGE e899(mm) WITH text-004 wa_return-message.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = lt_return3.
WRITE : ls_notifheader_export-notif_no.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |