Log to BAPI_PO_CREATE1
Hi,
I have an interface of SRM with the ECC that the BAPI_PO_CREATE1 to create PO in the ECC.
I have an PO that was created in October/2008 with Account Assignment for an order, however tab "Account Assignment" is also completed the "Cost Center" that was not used by the order.
You can find the log of the creation of the PO? I wonder if the value of the field cost center came from SRM.
Best Regards,
Luciano
Unfortunately you cannot get a log for the BAPI as per your requirement.
Select the PO in ME23N, goto Environment -> Item Changes.
If the PO has cost center (same as SRM) and there are no changes for the same in the log. This should explain/confirm.
Regards
Kathirvel
Similar Messages
-
BAPI_PO_CREATE1 in background
Hi,
How to suppress the E and A type messages from BAPI_PO_CREATE1 in the background to avoid that messages in Job log?
Ie. I want to avoid those messages which is automatically written to Job log in background mode.
I will process the return table and then will write the relevant messages to the job log.
Can anyone help?
DeepuWhat currently happening is i have used this BAPI_PO_CREATE1 in one program.
We can excecute the program either in foreground or background.
In foreground the errors are written to a list.<b>--->good</b>
In backgroung the errors are written to the Job log from the program, but what is actually happening is from BAPI_PO_CREATE1 all the E and A type messages are automatically logged into Job log and I wanted to avoid that.--->u can skip if it is back ground
<b>if sy-batch = 'X'.
dont display errors.
else.
errors.
endif.</b>
I will write the error log depending on my requirement.
now irrespective of my error log some other messages are also comming in the error log from BAPI_PO_CREATE1 in background.
I wanted to avoid those messages populating from the BAPI in the background.
<b>But question is : how to u come to know which records got uploaded into SAP ? how to u recorrect errrors?</b>
Regards
Prabhu -
Bapi_po_create1 is giving same system messages multiple time in the joblog
Hi Experts,
Bapi_po_create1 is giving same system messages multiple times in the job log when we ran the program in the background
can u plz suggest how to prevent these multiple appearances of same messages.
I am pasting the code below whn i ran this program in backgorund job log is having the messages.
Date Time Message text Message class Message no. Message type
08/06/2009 08:11:53 Job started 00 516 S
08/06/2009 08:11:53 Step 001 started (program ZZZTEST, variant &0000000000008, user ID BREDDY) 00 550 S
08/06/2009 08:11:54 Commitment plan contains no account assignment data MECP 020 S
08/06/2009 08:11:54 Commitment plan contains no account assignment data MECP 020 S
08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement ME 053 E
08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement ME 053 E
08/06/2009 08:11:54 Source not included in list despite source list requirement 06 722 E
08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained VH 777 S
08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained VH 777 S
08/06/2009 08:11:55 Status "Initial Block" of material 20111 does not allow external procurement ME 053 E
08/06/2009 08:11:55 Purchase order still contains faulty items MEPO 000 E
08/06/2009 08:11:55 Job finished 00 517 S
Edited by: bhavani prasad kotharu on Aug 6, 2009 3:09 PMHERE IS THE CODE OF THE PROGRAM, WE R JUST PASSING SOME PO DATA TO THE BAPI_PO_CREATE1,ON RUNNING THIS PROGRAM IN BACKGROUND SAME SYSTEM MESSAGES ARE APPEARED MULTIPLE TIMES,----
REPORT zzztest.
DATA : lwa_bapimepoheader TYPE bapimepoheader
,lwa_bapimepoheaderx TYPE bapimepoheaderx
,li_bapimepoitem TYPE STANDARD TABLE OF bapimepoitem
,lwa_bapimepoitem TYPE bapimepoitem
,li_bapimepoitemx TYPE STANDARD TABLE OF bapimepoitemx
,lwa_bapimepoitemx TYPE bapimepoitemx
,li_conditions TYPE STANDARD TABLE OF komv
,li_return TYPE STANDARD TABLE OF bapiret2
, n TYPE c
PARAMETERS: p1 TYPE c AS CHECKBOX.
IF p1 = 'X'.
lwa_bapimepoheader-doc_type = 'NB'.
lwa_bapimepoheader-purch_org = 'NA00'.
lwa_bapimepoheader-pur_group = 'C02'.
lwa_bapimepoheaderx-doc_type = 'X'.
lwa_bapimepoheaderx-purch_org = 'X'.
lwa_bapimepoheaderx-pur_group = 'X'.
lwa_bapimepoitem-po_item = '10'.
lwa_bapimepoitem-material = '000000000000020111'.
lwa_bapimepoitem-plant = 'CA01'.
lwa_bapimepoitem-vend_mat = '1000'.
lwa_bapimepoitem-quantity = '10'.
lwa_bapimepoitem-orderpr_un = 'M'.
lwa_bapimepoitem-no_more_gr = 'K'.
lwa_bapimepoitem-agreement = '4600000095'.
lwa_bapimepoitem-agmt_item = '10'.
lwa_bapimepoitem-pricedate = 'X'.
lwa_bapimepoitem-price_date = '20071030'.
lwa_bapimepoitem-no_rounding = 'X'.
APPEND lwa_bapimepoitem TO li_bapimepoitem.
lwa_bapimepoitemx-po_item = '10'.
lwa_bapimepoitemx-po_itemx = 'X'.
lwa_bapimepoitemx-po_itemx = 'X'.
lwa_bapimepoitemx-material = 'X'.
lwa_bapimepoitemx-plant = 'X'.
lwa_bapimepoitemx-quantity = 'X'.
lwa_bapimepoitemx-po_unit = 'X'.
lwa_bapimepoitemx-orderpr_un = 'X'.
lwa_bapimepoitemx-acctasscat = 'X'.
lwa_bapimepoitemx-agreement = 'X'.
lwa_bapimepoitemx-agmt_item = 'X'.
lwa_bapimepoitemx-pricedate = 'X'.
lwa_bapimepoitemx-price_date = 'X'.
lwa_bapimepoitemx-preq_no = 'X'.
lwa_bapimepoitemx-preq_item = 'X'.
lwa_bapimepoitemx-no_rounding = 'X'.
APPEND lwa_bapimepoitemx TO li_bapimepoitemx.
DATA: lo_msg_handler TYPE REF TO cl_message_handler_mm.
CALL METHOD cl_message_handler_mm=>get_handler
IMPORTING
ex_handler = lo_msg_handler.
lo_msg_handler->remove_all( ).
lo_msg_handler->cleanup( ).
CALL FUNCTION 'BAPI_PO_CREATE1' "in background task
EXPORTING
poheader = lwa_bapimepoheader
poheaderx = lwa_bapimepoheaderx
testrun = 'X'
NO_MESSAGING = c_x
NO_MESSAGE_REQ = c_x
no_authority = 'X'
IMPORTING
expheader = lwa_bapimepoheader
TABLES
return = li_return
poitem = li_bapimepoitem
poitemx = li_bapimepoitemx
conditions = li_conditions.
ENDIF.
Edited by: bhavani prasad kotharu on Aug 6, 2009 3:38 PM -
Problem in BAPI_PO_CREATE1 with delivery date option
Hi Experts,
I'm using BAPI_PO_CREATE1 for uploading user excel file to create purchase orders.
The issue is PO is created successfully but the delivery date is not picking properly. System is picking some other delivery date.
Can any one help me out from this?????????
Any USEFUL INPUTS for solving this issue will be rewarded.
Code :
REPORT zmm_bapi_po_create.
* ''~``
* ( o o )
* +------------------.oooO--(_)--Oooo.------------------+
* | ZMM_BAPI_PO_CREATE -To create Purchase orders |
* | |
* | .oooO |
* | ( ) Oooo. |
* +---------------------\ (----( )--------------------+
*& Program Name : ZMM_BAPI_PO_CREATE
*& Transaction Code :
*& Module Name : MM
*& Developer : Lakshmiraj.A
*& Functional : Xavier
*& Transport Request:
*& Program Type : Report
*& SAP Release : 46C
*&****************************REVISION LOG*****************************
*& Log Date Author Description
*&------------------------ TABLE USED --------------------------------*
*&---------------------- VARIABLE DECLARATION ------------------------*
* For Storing file name.
DATA : filename1 TYPE string.
* Flag to identify the matching entries
DATA : flag(1).
* For Display Message
DATA : g_msg(80) TYPE c.
* Declaring that as a character with length 4096.
TYPES truxs_t_text_data(4096) TYPE c OCCURS 0. " Type Group : TRUXS
* Containing RAW Data
DATA : it_raw TYPE truxs_t_text_data.
*&------------------------- INTERNAL TABLE ---------------------------*
DATA: gstest LIKE bapimepoheader.
DATA: g_ebeln LIKE bapimepoheader-po_number.
DATA: BEGIN OF g_bapimepoheader OCCURS 0.
INCLUDE STRUCTURE bapimepoheader.
DATA: END OF g_bapimepoheader.
DATA: BEGIN OF g_bapimepoheaderx OCCURS 0.
INCLUDE STRUCTURE bapimepoheaderx.
DATA: END OF g_bapimepoheaderx.
DATA: BEGIN OF g_bapimeposchedule OCCURS 0.
INCLUDE STRUCTURE bapimeposchedule.
DATA: END OF g_bapimeposchedule.
DATA: BEGIN OF g_poschedulex OCCURS 0.
INCLUDE STRUCTURE bapimeposchedulx.
DATA: END OF g_poschedulex.
*DATA: BEGIN OF g_bapieikp OCCURS 0.
* INCLUDE STRUCTURE bapieikp.
*DATA: END OF g_bapieikp.
DATA: BEGIN OF g_bapimepoitem OCCURS 0.
INCLUDE STRUCTURE bapimepoitem.
DATA: END OF g_bapimepoitem.
DATA: BEGIN OF g_poitemx OCCURS 0.
INCLUDE STRUCTURE bapimepoitemx.
DATA: END OF g_poitemx.
DATA: BEGIN OF g_bapiret2 OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF g_bapiret2.
DATA: BEGIN OF itab OCCURS 0,
doc_type LIKE bapimepoheader-doc_type,
vendor LIKE bapimepoheader-vendor,
purch_org LIKE bapimepoheader-purch_org,
pur_group LIKE bapimepoheader-pur_group,
comp_code LIKE bapimepoheader-comp_code,
incoterms1 LIKE bapimepoheader-incoterms1,
incoterms2 LIKE bapimepoheader-incoterms2,
po_item LIKE bapimepoitem-po_item,
material LIKE bapimepoitem-material,
short_text LIKE bapimepoitem-short_text,
quantity LIKE bapimepoitem-quantity,
plant LIKE bapimepoitem-plant,
delivery_date LIKE bapimeposchedule-delivery_date,
END OF itab.
DATA: it_itab LIKE itab OCCURS 0 WITH HEADER LINE.
*&------------------------ SELECTION SCREEN --------------------------*
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-100.
PARAMETERS : p_file LIKE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK blk.
*&-----------------------AT SELECTION SCREEN -------------------------*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
* For getting input filename
PERFORM get_filename.
*&-----------------------START OF SELECTION---------------------------*
START-OF-SELECTION.
* Open the Excel file and Update with the internal table
PERFORM update_inttable.
PERFORM bapi_upload.
* FORM bapi_upload *
FORM bapi_upload.
it_itab[] = itab[].
SORT itab BY vendor material.
DELETE ADJACENT DUPLICATES FROM itab COMPARING vendor.
LOOP AT itab.
g_bapimepoheader-comp_code = itab-comp_code.
g_bapimepoheader-doc_type = itab-doc_type.
g_bapimepoheader-creat_date = sy-datum.
g_bapimepoheader-created_by = sy-uname.
g_bapimepoheader-vendor = itab-vendor.
g_bapimepoheader-purch_org = itab-purch_org.
g_bapimepoheader-pur_group = itab-pur_group.
g_bapimepoheader-incoterms1 = itab-incoterms1.
g_bapimepoheader-incoterms2 = itab-incoterms2.
APPEND g_bapimepoheader.
g_bapimepoheaderx-comp_code = 'X'.
g_bapimepoheaderx-vendor = 'X'.
g_bapimepoheaderx-doc_type = 'X'.
g_bapimepoheaderx-purch_org = 'X'.
g_bapimepoheaderx-pur_group = 'X'.
g_bapimepoheaderx-incoterms1 = 'X'.
g_bapimepoheaderx-incoterms2 = 'X'.
APPEND g_bapimepoheaderx.
LOOP AT it_itab WHERE vendor = itab-vendor.
MOVE-CORRESPONDING it_itab TO g_bapimepoitem.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_itab-material
IMPORTING
output = it_itab-material.
g_bapimepoitem-material = it_itab-material.
APPEND g_bapimepoitem.
g_poitemx-po_item = it_itab-po_item.
g_poitemx-po_itemx = 'X'.
g_poitemx-item_cat = 'X'.
g_poitemx-plant = 'X'.
g_poitemx-stge_loc = 'X'.
g_poitemx-net_price = 'X'.
g_poitemx-acctasscat = 'X'.
g_poitemx-material = 'X'.
g_poitemx-short_text = 'X'.
g_poitemx-matl_group = 'X'.
g_poitemx-quantity = 'X'.
g_poitemx-po_unit = 'X'.
g_poitemx-orderpr_un = 'X'.
g_poitemx-trackingno = 'X'.
g_poitemx-delete_ind = 'X'.
APPEND g_poitemx.
g_bapimeposchedule-po_item = it_itab-po_item.
g_bapimeposchedule-sched_line = '001'.
g_bapimeposchedule-del_datcat_ext = 'X'.
g_bapimeposchedule-delivery_date = it_itab-delivery_date.
g_bapimeposchedule-quantity = it_itab-quantity.
APPEND g_bapimeposchedule.
g_poschedulex-po_item = it_itab-po_item.
g_poschedulex-sched_line = '001'.
g_poschedulex-po_itemx = 'X'.
g_poschedulex-sched_linex = 'X'.
g_poschedulex-del_datcat_ext = 'X'.
g_poschedulex-delivery_date = 'X'.
g_poschedulex-quantity = 'X'.
g_poschedulex-deliv_time = 'X'.
g_poschedulex-stat_date = 'X'.
APPEND g_poschedulex.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = g_bapimepoheader
poheaderx = g_bapimepoheaderx
IMPORTING
exppurchaseorder = g_ebeln
expheader = gstest
TABLES
return = g_bapiret2
poitem = g_bapimepoitem
poitemx = g_poitemx
poschedule = g_bapimeposchedule
poschedulex = g_poschedulex.
IF NOT g_ebeln IS INITIAL.
COMMIT WORK.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ''.
REFRESH : g_bapimepoitem,
g_bapimepoheader,
g_bapimepoheaderx,
g_bapiret2,
g_poitemx,
g_bapimeposchedule,
g_poschedulex.
ENDIF.
ENDLOOP.
ENDFORM.
* FORM GET_FILENAME *
FORM get_filename.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = sy-cprog
dynpro_number = sy-dynnr
field_name = ''
IMPORTING
file_name = p_file.
ENDFORM.
* FORM UPDATE_INTTABLE *
FORM update_inttable.
REFRESH : itab[] , itab.
CLEAR : itab.
IF NOT p_file IS INITIAL.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = itab[] " ACTUAL DATA
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc NE '0'.
PERFORM callerr USING 'File Error!'.
STOP.
ENDIF.
ELSE.
PERFORM callerr USING 'Choose the file'.
STOP.
ENDIF.
ENDFORM.
* FORM CALLERR *
* --> TEXT *
FORM callerr USING text TYPE string.
CALL FUNCTION 'FC_POPUP_ERR_WARN_MESSAGE'
EXPORTING
popup_title = 'ZMM_BAPI_PO_CREATE'
is_error = 'X'
message_text = text
start_column = 30
start_row = 8.
ENDFORM.
Regards
~Lakshmiraj~Hi,
1. In Which system you are trying to run this ???? Are you running in IDES or currently running system?
The reason may be if you are running in IDES , the factory calender may not be correctly positioned.
2. Also this error will occur at situations like....if your factory calendar will be of 2007 year....but the delievery date which you are giving is of 2008 . So error "delivery date exceeds factory calendar" occurs.
Some useful info for you,
Factory calander is must to run SAP. All the scheduling are calculated based on this only. You can define halidays for factory and assign to the calander. You can have 365 days calander / Sat& SU holiday calander or the holiday can be your wish.
The T code is SCAL. create holidays first. create holiday calendar and assign the holidays in holiday calendar. create factory calender and assign the holiday calendar in factory calendar.The Factory calendar is client specific
Rgds,
Lakshmiraj -
BAPI_PO_CREATE1 use in a loop - net price issue
Hi,
I'm using BAPI_PO_CREATE1 within a loop to create a PO with multiple items - grouped by vendor, plant and delivery date. After each BAPI call I use BAPI_TRANSACTION_COMMIT with WAIT = 'X', further I track the results from BAPIRETURN into some kind of log. All my structures and internal tables used in the bapi interface are cleared/freed after each call in order not to have inconsistent data. I'm passing only 1 condition 'PBXX' with net price. I'm passing 2 records in the condition table - 1st with CHANGE_ID = 'D', and second one with CHANGE_ID = 'I'. Further, I set (no_price_from_po = 'X') and (memory_uncomplete = 'X')
At the tests I used the same material vendor and plant in all items and only delivery date is different in order to create few orders one after another. Even price is changed for each item.
First of my PO within a loop is created as expected - with correct price value, even if the combination material/plant is passed twise and the resulted PO have 2 items.
The issue I have is comming out at the next PO-s (2nd, 3th..) - the system returns error message:
E-218 Net price must be greater than 0
I stuck right here. Tried quite a lot of different screnarios without success. Further tried even different vendor/material/plant for the second PO. Checked also the forum posts before to consider to write this one - haven't found anything relevant which might be of any help.
Any ideas what is wrong?
Thanks in advance.
Regards,
Ivaylo MutafchievHi,
in fact my price values were not so small - 2.15, 1.55, 2.45, etc... but nothing less than 1.00. Nevertheless, you pointed me to the right direction - to search OSS for the answer. OSS Note 571860:
https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=571860
helps me to find out what I missed in my scenario: I didn't set ITEM-NET_PRICE at all, just via condition table. Now, when I added the following:
item-net_price = some_price. itemx-net_price = 'X'.
item-po_price = '2'. itemx-po_price = 'X'. " <-- in fact, PO is created even without this line
all of my POs are created with correct prices from the input.
Problem solved.
Thanks!
Ivaylo -
In the item table passed to BAPI_PO_CREATE, there is a column called PO_PRICE in the structure PAPIEKPOC. An "X" in this field tells the system not to step on the PR price with the PIR price.
So first question: is thre an equivalent of this field in BAPI_PO_CREATE1, either in the BAPIMEPOITEM structure or somewhere else ????
And second question, where in IMG/SPRO do you configure the online transaction ME21N so that it doesn't step on the PR price with the PIR price? (I'm assuming there's got to be a way to do this, if the BAPI can be configured.)Okay,
David,
Just refer below two links hope it will help you enough
http://sap.ittoolbox.com/groups/technical-functional/sap-log-mm/valuation-price-in-po-1425092?cv=expanded
http://kowboyz.blogspot.com/2008/05/copy-price-from-pr-to-po.html
Edited by: Amit Gujargoud on Nov 6, 2008 8:01 PM -
Strange Behavior of program while using BAPI_PO_CREATE1
Hello SAP GURUs,
I've created an Upload Program using BAPI_PO_CREATE1 for Mass Service PO Creation.
When I execute the program and Specify the File for uploading, It Gives me errors as
E BAPI 1 No instance of object type PurchaseOrder has been created. External reference:
E MEPO 0 Purchase order still contains faulty items
E 6 436 In case of account assignment, please enter acc. assignment data for item
But when I come back to Selection Screen of the Program and specify the SAME FILE AGAIN and Execute,
The Program runs successfully and generates the PO number.
I have never seen such strange behavior in any BAPIs before.
Pls help..PERFORM refresh_tables.
PERFORM fill_tables.
END-OF-SELECTION.
Display the Summary as an ALV Grid Display
IF NOT ig_mymssg[] IS INITIAL.
PERFORM display_basic_list . "Grid Display
ELSE.
MESSAGE s000 WITH 'No data exists'(051).
STOP.
ENDIF.
*& Form refresh_tables
text
--> p1 text
<-- p2 text
FORM refresh_tables .
REFRESH: ig_fieldcat,
ig_mymssg,
poitem,
poitemx,
poaccount,
poaccountx,
poservices,
ig_return.
wt_itab, record, record2 .
ENDFORM. " refresh_tables
*& Form fill_tables
text
--> p1 text
<-- p2 text
FORM fill_tables .
record2[] = record[].
record3[] = record[].
DELETE ADJACENT DUPLICATES FROM record COMPARING id_no.
DELETE ADJACENT DUPLICATES FROM record2 COMPARING id_no po_item.
SELECT MAX( packno ) FROM esll INTO wrk_packno.
LOOP AT record.
CLEAR : poheader, poheaderx, wa_poitem, wa_poitemx, wa_poservices, wa_poaccount, wa_poaccountx, wa_poschedulex, wa_poschedule.
REFRESH: poitem, poitemx, poaccount, poaccountx, poservices, ig_return, posrvaccessvalues, poschedule, poschedulex.
PERFORM po_header.
LOOP AT record2 WHERE id_no = record-id_no.
wrk_packno = wrk_packno + 1.
PERFORM po_item.
PERFORM po_scheudle.
PERFORM acc_assignment.
PERFORM po_services.
ENDLOOP.
PERFORM create_po.
ENDLOOP.
ENDFORM. " fill_tables
*& Form display_basic_list
text
--> p1 text
<-- p2 text
FORM display_basic_list .
g_repid = sy-repid.
PERFORM f2000_fieldcat_init .
PERFORM display_alv_grid_1.
ENDFORM. " display_basic_list
*& Form f2000_fieldcat_init
text
--> p1 text
<-- p2 text
FORM f2000_fieldcat_init .
REFRESH ig_fieldcat.
PERFORM fill_fields_of_fieldcatalog USING 'IG_MYMSSG'
'STATUS'
c_x
'Status'
'10'.
PERFORM fill_fields_of_fieldcatalog USING 'IG_MYMSSG'
'RECORD'
c_x
'Record'
'20'.
PERFORM fill_fields_of_fieldcatalog USING 'IG_MYMSSG'
'ERRMSG'
'Message'
'100'.
ENDFORM. " f2000_fieldcat_init
*& Form display_alv_grid_1
text
--> p1 text
<-- p2 text
FORM display_alv_grid_1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_structure_name = 'IG_MYMSSG'
i_grid_title = 'LOG'
is_layout = wg_layout
it_fieldcat = ig_fieldcat[]
i_save = c_save
TABLES
t_outtab = ig_mymssg
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_alv_grid_1
*& Form fill_fields_of_fieldcatalog
text
-->P_0626 text
-->P_0627 text
-->P_C_X text
-->P_0629 text
-->P_0630 text
FORM fill_fields_of_fieldcatalog USING p_tabname TYPE slis_tabname
p_field TYPE slis_fieldname
p_key TYPE c
p_name
len.
To fill in the fields of the table fieldcatalog depending on the field
CLEAR wg_fieldcat.
wg_fieldcat-fieldname = p_field. " The field name and the table
wg_fieldcat-tabname = p_tabname.. " name are the two minimum req
wg_fieldcat-key = p_key. " Specifies the column as a key
wg_fieldcat-seltext_l = p_name. " Column Header
wg_fieldcat-outputlen = len.
APPEND wg_fieldcat TO ig_fieldcat.
ENDFORM. " fill_fields_of_fieldcatalog
*& Form create_po
text
--> p1 text
<-- p2 text
FORM create_po .
CLEAR : wg_return.
REFRESH : ig_return.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = poheader
poheaderx = poheaderx
IMPORTING
exppurchaseorder = po_no
TABLES
return = ig_return
poitem = poitem
poitemx = poitemx
poschedule = poschedule
poschedulex = poschedulex
poaccount = poaccount
poaccountx = poaccountx
poservices = poservices
posrvaccessvalues = posrvaccessvalues.
SORT ig_return BY type.
READ TABLE ig_return INTO wg_return WITH KEY type = 'S'.
IF sy-subrc EQ 0.
CLEAR : wg_return.
REFRESH : ig_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
CLEAR wg_errmsg.
WRITE icon_green_light AS ICON TO wg_errmsg-status.
CONCATENATE record-id_no po_no INTO wg_errmsg-record SEPARATED BY '/'.
wg_errmsg-record = po_no.
wg_errmsg-errmsg = 'PO created'.
APPEND wg_errmsg TO ig_mymssg.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
READ TABLE ig_return INTO wg_return WITH KEY type = 'E' TRANSPORTING message.
CLEAR wg_errmsg.
WRITE icon_red_light AS ICON TO wg_errmsg-status.
wg_errmsg-record = record-id_no.
wg_errmsg-errmsg = wg_return-message.
APPEND wg_errmsg TO ig_mymssg.
ENDIF.
ENDFORM. " create_po
*& Form po_header
text
--> p1 text
<-- p2 text
FORM po_header .
poheader-comp_code = record-comp_code.
poheader-doc_type = record-doc_type.
poheader-vendor = record-vendor.
poheader-purch_org = 'SERV'.
poheader-pur_group = record-pur_group.
poheader-currency = 'INR'.
poheaderx-comp_code = 'X'.
poheaderx-doc_type = 'X'.
poheaderx-vendor = 'X'.
poheaderx-purch_org = 'X'.
poheaderx-pur_group = 'X'.
poheaderx-currency = 'X'.
ENDFORM. " po_header
*& Form po_item
text
--> p1 text
<-- p2 text
FORM po_item .
DATA : days TYPE num2.
DATA : final_dt TYPE datum.
DATA : is_ok TYPE boole_d.
DATA : msg_hndlr TYPE REF TO if_hrpa_message_handler.
days = 20.
CALL FUNCTION 'HR_ECM_ADD_PERIOD_TO_DATE'
EXPORTING
orig_date = sy-datum
num_days = days
signum = '+'
message_handler = msg_hndlr
IMPORTING
result_date = final_dt
is_ok = is_ok.
CLEAR: wa_poitem,wa_poitemx.
wa_poitem-po_item = record2-po_item.
wa_poitem-short_text = record2-short_text.
wa_poitem-plant = record2-plant.
wa_poitem-matl_group = 'S001'.
wa_poitem-tax_code = 'LA'.
wa_poitem-item_cat = item_cat.
wa_poitem-pckg_no = wrk_packno.
wa_poitem-acctasscat = acctasscat.
wa_poitem-gr_to_date = final_dt.
APPEND wa_poitem TO poitem.
wa_poitemx-po_item = record2-po_item.
wa_poitemx-po_itemx = 'X'.
wa_poitemx-short_text = 'X'.
wa_poitemx-plant = 'X'.
wa_poitemx-tax_code = 'X'.
wa_poitemx-item_cat = 'X'.
wa_poitemx-acctasscat = 'X'.
wa_poitemx-pckg_no = 'X'.
wa_poitemx-matl_group = 'X'.
wa_poitem-gr_to_date = 'X'.
APPEND wa_poitemx TO poitemx.
ENDFORM. " po_item
*& Form PO_SERVICES
text
--> p1 text
<-- p2 text
FORM po_services .
CLEAR: wa_poservices, wa_posrvaccessvalues.
wa_poservices-pckg_no = wrk_packno.
wa_poservices-line_no = '0000000001'.
wa_poservices-outl_ind = 'X'.
wa_poservices-subpckg_no = wa_poservices-pckg_no + 1.
wa_poservices-from_line = '000001'.
APPEND wa_poservices TO poservices.
CLEAR wa_poservices.
wrk_packno = wrk_packno + 1.
wa_poservices-pckg_no = wrk_packno.
wa_poservices-line_no = '0000000002'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = record2-service
IMPORTING
output = record2-service.
wa_poservices-ext_line = '0000000010'.
wa_poservices-service = record2-service.
wa_poservices-quantity = record2-quantity.
wa_poservices-gr_price = record2-gr_price.
wa_posrvaccessvalues-pckg_no = wrk_packno.
wa_posrvaccessvalues-line_no = '0000000002'.
wa_posrvaccessvalues-serial_no = '01'.
wa_posrvaccessvalues-serno_line = '01'.
wa_posrvaccessvalues-quantity = record2-quantity.
wa_posrvaccessvalues-net_value = record2-gr_price.
APPEND wa_poservices TO poservices.
APPEND wa_posrvaccessvalues TO posrvaccessvalues.
ENDFORM. " PO_SERVICES
*& Form ACC_ASSIGNMENT
text
--> p1 text
<-- p2 text
FORM acc_assignment .
DATA : tmp_gl LIKE bapimepoaccount-gl_account.
tmp_gl = '400265'.
CLEAR : wa_poaccount, wa_poaccountx.
wa_poaccount-po_item = record2-po_item.
wa_poaccount-serial_no = '01'.
wa_poaccount-co_area = '1000'.
wa_poaccount-quantity = record2-quantity.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = tmp_gl
IMPORTING
output = wa_poaccount-gl_account.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = record2-orderid
IMPORTING
output = wa_poaccount-orderid.
APPEND wa_poaccount TO poaccount.
wa_poaccountx-po_item = record2-po_item.
wa_poaccountx-serial_no = '01'.
wa_poaccountx-co_area = 'X'.
wa_poaccountx-quantity = 'X'.
wa_poaccountx-gl_account = 'X'.
wa_poaccountx-orderid = 'X'.
APPEND wa_poaccountx TO poaccountx.
ENDFORM. " ACC_ASSIGNMENT
*& Form PO_SCHEUDLE
text
--> p1 text
<-- p2 text
FORM po_scheudle .
CLEAR : wa_poschedule, wa_poschedulex.
wa_poschedule-po_item = record2-po_item.
wa_poschedule-sched_line = '0001'.
wa_poschedule-del_datcat_ext = 'D'.
wa_poschedule-delivery_date = sy-datum.
wa_poschedule-quantity = record2-quantity.
APPEND wa_poschedule TO poschedule.
wa_poschedulex-po_item = record2-po_item.
wa_poschedulex-sched_line = '0001'.
wa_poschedulex-po_itemx = 'X'.
wa_poschedulex-sched_linex = 'X'.
wa_poschedulex-del_datcat_ext = 'X'
wa_poschedulex-delivery_date = 'X'.
wa_poschedulex-quantity = 'X'.
APPEND wa_poschedulex TO poschedulex.
ENDFORM. " PO_SCHEUDLE -
BAPI job log messages are disabled
Can not view messages in a BAPI in the job log?
the bapi is .
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = lw_poheader
poheaderx = lw_poheaderx
IMPORTING
exppurchaseorder = lv_ebeln
expheader = lw_expheader
TABLES
return = lt_poreturn
poitem = lt_poitem
poitemx = lt_poitemx
poaccount = lt_poaccount
poaccountx = lt_poaccountx
poservices = lt_poservices.
the report is run in beckground and the register of the job appear to me all the messages of type E, W, S, I return that returns the structure of the BAPI. I am interested only messages type S, E.
Help
Edited by: francesco aiello on Jan 20, 2010 9:38 AM
Edited by: francesco aiello on Jan 20, 2010 9:47 AM -
Sc not transfered to backend rfc error after bapi_po_create1 ?
I have one user who's shoppingcarts are not transferred to the backend. when I try to transfer it manually with BBP_PD_SC_TRANSFER I get an rfc error after the bapi_po_create1
for the rest the whole system is functioning as it should but only for this user the shoppingcarts are not transfered. I also don't get any errors back from the bapi.
anybody got a clue what can be wrong with this particular user ?
I checked everything in ppoma but can't find any flaws or errors.
kind regards
arthur>
Virender Singh wrote:
> Hi
> Did you check the Error Log in RZ20. There has to be something wrong in this shopping cart data. Is the SC Approved? What is the error shown by BAPI_PO_CREATE1?
>
> Regards
> Virender Singh
I am a bit closer to the answer I guess. no there were no erros given with BAPI_PO_CREATE1
fuzzy part however with the sc was that there was only an acc_no of 002. since the last hrsps on the backend the BAPI_PO_CREATE1 gave errors back that it didn't accept 002 without a 001
so I checked in a badi if there were acc_no with 02 and 100% costassignment and transfered these back to 01
with the badi BBP_CREATE_BE_PO_NEW. that was working very nice until one user could not transfer any shoppingcart anymore. I saw that she had a workprocedure that caused the 02 acc_no (she used copy paste) when I let her do it without copy paste and just change it then the shoppingcart created a PO.
but I'm puzzled what I'm missing here and why it most of the times work but sometimes it just doesn't give any errors back and no purchasenr but just an exception others.
can I debug this further on in the backend somehow what causes the exception ?
kind regards
arthur -
Does SAP maintain log of all the messages displayed on screen using MESSAGE statement?
We are investigating a problem and want to see the messages displayed by SAP during the time when problem occured.We have custom development for picking and confirmation. Last week we found that in some deliveries there is difference in delivered quantity and packed quantity.
Custom development is calling sap-standard FMs. Problem occurs randomly, roughly 10 deliveries in a week has this problem.
We are still trying to investigate the reason that is causing the problem.
Custom program does display the message to user if FM raise any message. We asked user of they are getting any message while picking, and if they are ignoring it.
They just confirmed that they are getting message 'Packing Not Possible Since there is no Quantity to be Packed' and they did ignored this. -
Botão de 'exibir logs' não aparece - NF 3.10
Pessoal, boa tarde!
Preciso de uma ajuda de vocês...
Estamos na fase de validação de um projeto de NFe 3.10, e o abap já realizou toda a aplicação de notas necessárias.
O problema é que o cliente percebeu que uma funcionalidade de "exibir logs" foi desativada logo após a aplicação dessas notas!
Antes quando ele fazia a J1B1N por exemplo, aparecia conforme as imagens abaixo:
E pelo que eles perceberam, agora esse botão e esses logs não aparecem mais.
Alguém sabe dizer porque ? Alguém já passou por isso ?
Muito obrigado,
Luis.Boa Tarde Luis
Já tentou verificar se o controle de tela não foi alterado?
Pois houveram alterações nos controles de tela da 2.00 para a 3.10.
Verifique se os campos continuam como obrigatórios nos controles de tela.
Abraço
Giovani -
Error Log during logon of RAR 5.3 Portal - please help
Hi Experts,
We are unable to login into the CC portal [GRC RAR 5.3]. The login screen is appearing again and again without logging into the CC portal
Below is the log file which we are getting and we understand that the product is not responding properly to the application
Can somebody please help us in resolving this at the earliest
Thanks in Advance
Best Regagards,
Srihari.K
Date : 12/05/2008
Time : 2:38:16:008
Message : Exception of type com.sap.sql.log.OpenSQLException caught: Cannot assign NULL to host variable 1. setNull() can only be used in INSERT and UPDATE statements. The statement is "SELECT MIN("YEARMONTH") "YEARMONTH",MIN("VIOLTYPE") "VIOLTYPE",MIN("VSYSKEY") "VSYSKEY",MIN("ANLTYPE") "ANLTYPE",MIN("USERGROUP") "USERGROUP",SUM("TOTCOUNT") "TOTCOUNT",SUM("RISKLOW") "RISKLOW",SUM("RISKMED") "RISKMED",SUM("RISKHIGH") "RISKHIGH",SUM("RISKCRT") "RISKCRT",SUM("URNONE") "URNONE",SUM("URLOW") "URLOW",SUM("URMED") "URMED",SUM("URHIGH") "URHIGH",SUM("URCRT") "URCRT",SUM("URMIT") "URMIT",MAX("TOTCRTCD") "TOTCRTCD",SUM("CRTCD") "CRTCD",MAX("TOTCRROLE") "TOTCRROLE",SUM("CRROLE") "CRROLE",SUM("TOTUSER") "TOTUSER",MIN("RUNDATE") "RUNDATE" FROM "VIRSA_CC_MGMTTOT" WHERE "YEARMONTH" = ? AND "VIOLTYPE" = ? AND "VSYSKEY" LIKE ? AND "ANLTYPE" = ? AND "USERGROUP" LIKE ?"..
[EXCEPTION]
com.sap.sql.log.OpenSQLException: Cannot assign NULL to host variable 1. setNull() can only be used in INSERT and UPDATE statements. The statement is "SELECT MIN("YEARMONTH") "YEARMONTH",MIN("VIOLTYPE") "VIOLTYPE",MIN("VSYSKEY") "VSYSKEY",MIN("ANLTYPE") "ANLTYPE",MIN("USERGROUP") "USERGROUP",SUM("TOTCOUNT") "TOTCOUNT",SUM("RISKLOW") "RISKLOW",SUM("RISKMED") "RISKMED",SUM("RISKHIGH") "RISKHIGH",SUM("RISKCRT") "RISKCRT",SUM("URNONE") "URNONE",SUM("URLOW") "URLOW",SUM("URMED") "URMED",SUM("URHIGH") "URHIGH",SUM("URCRT") "URCRT",SUM("URMIT") "URMIT",MAX("TOTCRTCD") "TOTCRTCD",SUM("CRTCD") "CRTCD",MAX("TOTCRROLE") "TOTCRROLE",SUM("CRROLE") "CRROLE",SUM("TOTUSER") "TOTUSER",MIN("RUNDATE") "RUNDATE" FROM "VIRSA_CC_MGMTTOT" WHERE "YEARMONTH" = ? AND "VIOLTYPE" = ? AND "VSYSKEY" LIKE ? AND "ANLTYPE" = ? AND "USERGROUP" LIKE ?".
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setNull(CommonPreparedStatement.java:303)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:509)
at com.sap.sql.sqlj.runtime.profile.ref.RTStatementJDBCPrepared.setString(RTStatementJDBCPrepared.java:359)
at com.virsa.cc.xsys.mgmreport.dao.sqlj.MGMTotalDAO.getResult(MGMTotalDAO.sqlj:63)
at com.virsa.cc.ui.RARiskVGraph.refreshData(RARiskVGraph.java:476)
at com.virsa.cc.ui.RARiskVGraph.wdDoInit(RARiskVGraph.java:130)
at com.virsa.cc.ui.wdp.InternalRARiskVGraph.wdDoInit(InternalRARiskVGraph.java:191)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:754)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:289)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Severity : Error
Category : /System/Database/sql/jdbc/common
Location : com.sap.sql.jdbc.common.CommonPreparedStatement
Application : sap.com/tcwddispwda
Thread : SAPEngine_Application_Thread[impl:3]_32
Datasource : 1666450:/apps/usr/sap/HLG/JC00/j2ee/cluster/server0/log/defaultTrace.trc
Message ID : 0003BAF96A51006E0000001F0000265200045D4A46588084
Source Name : com.sap.sql.jdbc.common.CommonPreparedStatement
Argument Objs : com.sap.sql.log.OpenSQLException,Cannot assign NULL to host variable 1. setNull() can only be used in INSERT and UPDATE statements. The statement is "SELECT MIN("YEARMONTH") "YEARMONTH",MIN("VIOLTYPE") "VIOLTYPE",MIN("VSYSKEY") "VSYSKEY",MIN("ANLTYPE") "ANLTYPE",MIN("USERGROUP") "USERGROUP",SUM("TOTCOUNT") "TOTCOUNT",SUM("RISKLOW") "RISKLOW",SUM("RISKMED") "RISKMED",SUM("RISKHIGH") "RISKHIGH",SUM("RISKCRT") "RISKCRT",SUM("URNONE") "URNONE",SUM("URLOW") "URLOW",SUM("URMED") "URMED",SUM("URHIGH") "URHIGH",SUM("URCRT") "URCRT",SUM("URMIT") "URMIT",MAX("TOTCRTCD") "TOTCRTCD",SUM("CRTCD") "CRTCD",MAX("TOTCRROLE") "TOTCRROLE",SUM("CRROLE") "CRROLE",SUM("TOTUSER") "TOTUSER",MIN("RUNDATE") "RUNDATE" FROM "VIRSA_CC_MGMTTOT" WHERE "YEARMONTH" = ? AND "VIOLTYPE" = ? AND "VSYSKEY" LIKE ? AND "ANLTYPE" = ? AND "USERGROUP" LIKE ?".,com.sap.sql.log.OpenSQLException: Cannot assign NULL to host variable 1. setNull() can only be used in INSERT and UPDATE statements. The statement is "SELECT MIN("YEARMONTH") "YEARMONTH",MIN("VIOLTYPE") "VIOLTYPE",MIN("VSYSKEY") "VSYSKEY",MIN("ANLTYPE") "ANLTYPE",MIN("USERGROUP") "USERGROUP",SUM("TOTCOUNT") "TOTCOUNT",SUM("RISKLOW") "RISKLOW",SUM("RISKMED") "RISKMED",SUM("RISKHIGH") "RISKHIGH",SUM("RISKCRT") "RISKCRT",SUM("URNONE") "URNONE",SUM("URLOW") "URLOW",SUM("URMED") "URMED",SUM("URHIGH") "URHIGH",SUM("URCRT") "URCRT",SUM("URMIT") "URMIT",MAX("TOTCRTCD") "TOTCRTCD",SUM("CRTCD") "CRTCD",MAX("TOTCRROLE") "TOTCRROLE",SUM("CRROLE") "CRROLE",SUM("TOTUSER") "TOTUSER",MIN("RUNDATE") "RUNDATE" FROM "VIRSA_CC_MGMTTOT" WHERE "YEARMONTH" = ? AND "VIOLTYPE" = ? AND "VSYSKEY" LIKE ? AND "ANLTYPE" = ? AND "USERGROUP" LIKE ?".
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setNull(CommonPreparedStatement.java:303)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:509)
at com.sap.sql.sqlj.runtime.profile.ref.RTStatementJDBCPrepared.setString(RTStatementJDBCPrepared.java:359)
at com.virsa.cc.xsys.mgmreport.dao.sqlj.MGMTotalDAO.getResult(MGMTotalDAO.sqlj:63)
at com.virsa.cc.ui.RARiskVGraph.refreshData(RARiskVGraph.java:476)
at com.virsa.cc.ui.RARiskVGraph.wdDoInit(RARiskVGraph.java:130)
at com.virsa.cc.ui.wdp.InternalRARiskVGraph.wdDoInit(InternalRARiskVGraph.java:191)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:754)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:289)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Arguments : com.sap.sql.log.OpenSQLException,Cannot assign NULL to host variable 1. setNull() can only be used in INSERT and UPDATE statements. The statement is "SELECT MIN("YEARMONTH") "YEARMONTH",MIN("VIOLTYPE") "VIOLTYPE",MIN("VSYSKEY") "VSYSKEY",MIN("ANLTYPE") "ANLTYPE",MIN("USERGROUP") "USERGROUP",SUM("TOTCOUNT") "TOTCOUNT",SUM("RISKLOW") "RISKLOW",SUM("RISKMED") "RISKMED",SUM("RISKHIGH") "RISKHIGH",SUM("RISKCRT") "RISKCRT",SUM("URNONE") "URNONE",SUM("URLOW") "URLOW",SUM("URMED") "URMED",SUM("URHIGH") "URHIGH",SUM("URCRT") "URCRT",SUM("URMIT") "URMIT",MAX("TOTCRTCD") "TOTCRTCD",SUM("CRTCD") "CRTCD",MAX("TOTCRROLE") "TOTCRROLE",SUM("CRROLE") "CRROLE",SUM("TOTUSER") "TOTUSER",MIN("RUNDATE") "RUNDATE" FROM "VIRSA_CC_MGMTTOT" WHERE "YEARMONTH" = ? AND "VIOLTYPE" = ? AND "VSYSKEY" LIKE ? AND "ANLTYPE" = ? AND "USERGROUP" LIKE ?".,com.sap.sql.log.OpenSQLException: Cannot assign NULL to host variable 1. setNull() can only be used in INSERT and UPDATE statements. The statement is "SELECT MIN("YEARMONTH") "YEARMONTH",MIN("VIOLTYPE") "VIOLTYPE",MIN("VSYSKEY") "VSYSKEY",MIN("ANLTYPE") "ANLTYPE",MIN("USERGROUP") "USERGROUP",SUM("TOTCOUNT") "TOTCOUNT",SUM("RISKLOW") "RISKLOW",SUM("RISKMED") "RISKMED",SUM("RISKHIGH") "RISKHIGH",SUM("RISKCRT") "RISKCRT",SUM("URNONE") "URNONE",SUM("URLOW") "URLOW",SUM("URMED") "URMED",SUM("URHIGH") "URHIGH",SUM("URCRT") "URCRT",SUM("URMIT") "URMIT",MAX("TOTCRTCD") "TOTCRTCD",SUM("CRTCD") "CRTCD",MAX("TOTCRROLE") "TOTCRROLE",SUM("CRROLE") "CRROLE",SUM("TOTUSER") "TOTUSER",MIN("RUNDATE") "RUNDATE" FROM "VIRSA_CC_MGMTTOT" WHERE "YEARMONTH" = ? AND "VIOLTYPE" = ? AND "VSYSKEY" LIKE ? AND "ANLTYPE" = ? AND "USERGROUP" LIKE ?".
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setNull(CommonPreparedStatement.java:303)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:509)
at com.sap.sql.sqlj.runtime.profile.ref.RTStatementJDBCPrepared.setString(RTStatementJDBCPrepared.java:359)
at com.virsa.cc.xsys.mgmreport.dao.sqlj.MGMTotalDAO.getResult(MGMTotalDAO.sqlj:63)
at com.virsa.cc.ui.RARiskVGraph.refreshData(RARiskVGraph.java:476)
at com.virsa.cc.ui.RARiskVGraph.wdDoInit(RARiskVGraph.java:130)
at com.virsa.cc.ui.wdp.InternalRARiskVGraph.wdDoInit(InternalRARiskVGraph.java:191)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:754)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:289)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Dsr Component : n/a
Dsr Transaction : d2d9c100c2b811dd9eb60003baf96a51
Dsr User :
Indent : 0
Level : 0
Message Code : com.sap.sql_0019
Message Type : 1
Relatives : /System/Database/sql/jdbc/common
Resource Bundlename :
Session : 92
Source : com.sap.sql.jdbc.common.CommonPreparedStatement
ThreadObject : SAPEngine_Application_Thread[impl:3]_32
Transaction :
User : ac_adminHi,
The shear length of your post is frightening - this would keep many potential replies away !!
What i woudl recommend is --> Open an OSS messgae ! This would resolve your problem !!
Thanks -
NoClassDefFoundError: com/sap/sql/log/OpenSQLException
I have developed a Java project. It consists of 2 SQLJ files and then a Java class. When I try to execute the Java program, I get a Java error:
java.lang.NoClassDefFoundError: com/sap/sql/log/OpenSQLException
at com.mbb.crrs.business.report.dao.ReportDAO.<init>(ReportDAO.sqlj:23)
at com.mbb.crrs.business.report.dao.Test.main(Test.java:24)
Exception in thread "main"
I notice a similar problem on message: Re: Which jar to include com.sap.sql.log.OpenSQLException
Is that something that I need to maintain for it to work? Thank you.Hi,
the problem one year ago was that the SQLException class was not available through remote access. I don't know if that might have been changed meanwhile in the latest release.
I implemented a simple work around: I caught every SQL-exception in the method where it was thrown, wrapped the exception message and any nested exception in a self written exception and threw this new exception. That worked fine.
Regards, Astrid -
Hi All,
We have an R/3 4.0B landscape and are working on some changes. I want to see if any SAP delivered objects have been modified in the past, but whenever I run SPAU or SPDD, I get an error message
"Error Reading File D:\usr\sap\put\log\umodstat.log" "Message Number 0U 503".
I can read a text file in the same directory through AL11, so I'm reasonably sure it's not an OS permission problem.
Any ideas?
Thanks,
AlanHi All,
I had same issue trying to edit sat.trc file, I fixed this problem by manual editing sat.trc file and modified the following line:
<!FORMATTER[com.sap.tc.logging.perf.PerfFormatter]/>
change to:
<!FORMATTER[com.sap.tc.logging.ListFormatter]/>
after changes you will able to open file with Visaul Admin Log Viewer or standalone logviewer.
Hope it helps.
Regards -
BRF+ Message Log & "Rule as Expression"
Hi colleagues,
I am quite new to BRFplus and have two questions:
1) I would like to use a message log action in order to indicate errors. I tried to follow https://wiki.wdf.sap.corp/wiki/display/FDT/Message+Log with method SET_APPLICATION_LOG_OBJECT, but I can't find the class this method belogns to. I also tried modelling a rule & action message log with help of the UI. My question is how can I log messages and where can I find them after the function is beeing processed?
2) In every guide I can read something about rule expressions and even how to create them (e.g. http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cc/85414842c8470bb19b53038c4b5259/frameset.htm), but in the workbench there is no possibilty of creating rules as expressions but only rules and rulesets (the rule is not part of the "Expression" node).
I hope somebody knows what I mean
Thanks a lot & kind regards,
IlijanaThanks a lot for your response!
Could you tell me why using rules and rulesets is not recommended for 7.01 ? This could be interesting for my bachelor thesis.
Thanks & Kind Regards,
Ilijana
Maybe you are looking for
-
Can not update iTunes because I have iMac with 10.5.8 . How I will sync my iphone 6.0 with an older version of iTunes on my iMac???? There is no update for the software of my iMac and no update for the iTunes.... So how can I sync????
-
Scale base value with price discrepancy credit note
Hi gurus, I have a problem in which credit notes for price discrepancies are having direct effect over scale base value in structure S060. I tried to modify the update rules, but found out this is hard coded for this structure. The other solution wil
-
How do type on a email that was sent to me?
how do i type on an email that was sent to me.
-
Set application item from javascript?
Hi! Is it possible to set an APPLICATION ITEM from javascript? If so can some one please point me to the thread, or a FAQ or an example, etc? Thanks! Dave Venus
-
How to take float precision to two decimal places?
Hi, everybody: I'm a straight noob...first week in Java programming. Before you bash me for not checking FAQs and such, believe me, I have. I have tried BigDecimal movePointLeft, but I don't know how to construct it using proper syntax. I also tried