09-12-2014 4:17 PM
Hi Gurus,,
Someone knows how to fill this field when creating a PR? I am using BAPI_PR_CREATE and send the value N(3) to this field through the parameter internal table pritem and pritemx ('X') but this fields doesn't get updated.
1) Perhaps I am filling an incorrect value, so Which table has the list of values of this field?
2) How Can I fill this field?
.
.
.
.
.
wa_item-prio_requirement = '001'
APPEND wa_item TO t_item.
.
.
.
.
wa_itemx-prio_requirement = 'X'.
APPEND wa_itemx TO t_itemx.
* Create the PR with the above data's.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
prheader = wa_header
prheaderx = wa_headerx
IMPORTING
number = pw_pr_number
TABLES
return = t_return
pritem = t_item
pritemx = t_itemx
.
.
.
.
09-13-2014 10:51 AM
09-14-2014 4:42 PM
Hi Felipe,
I found this, can you help how to solve it? thank you for your time.
Note 868736 - Field selection for SPEC2000 fields in purchase requisition
Symptom
It is not possible to set field selection for SPEC2000 fields in enjoy transactions of purchase requisition, Viz., ME51N, ME52N.
Other Terms
ADMOI, ADPRI, ADACN, fieldselection, Model ID code, Order Priority, Aircraft Registration Number
09-14-2014 4:53 PM
Enrique, this note is related to SAP Discrete Industries and Mill Products, is it your case? I think that note won't help you.
I have found two notes that match with your issue, but seems to work only with Purchase order BAPI's:
578063 - Purchase order BAPI's in A&D - 1
595623 - Purchase order BAPI's in A&D - 2
Regards,
Felipe
09-15-2014 6:03 AM
Hi Felipe,
This is the technical info of the field ADPRI. I am using BAPI_PR_CREATE. I can create the PR but this field ADPRI is not saved whe creating the PR.
I have read the notes, but I dont understand how to solve my problem.
Thanks for answer.
09-15-2014 10:53 AM
Enrique, the field that you are trying to update does not exists as parameter in the BAPI_PR_CREATE, the OSS notes that I posted solves the problem in the bapis for purchase order but I am not sure if solves for the PR bapi's. I recommend you to contact SAP openning a ticket.
Regards,
Felipe
09-15-2014 2:09 PM
Hi Felipe,
So, I was using the wrong field in the structure? take a look at the images, theres is a table with the values of the combo.
DATA:
t_item LIKE TABLE OF bapimereqitemimp WITH HEADER LINE,
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
prheader = wa_header
prheaderx = wa_headerx
IMPORTING
number = pw_pr_number
TABLES
return = t_return
pritem = t_item
pritemx = t_itemx
praccount = t_praccount
praccountx = t_praccountx
"pritemsource = t_itemsource
"pritemtext = t_itext
EXTENSIONIN = lt_extensionin
EXCEPTIONS
OTHERS = 1.
09-15-2014 2:53 PM
The fields 'prio_requirement' and 'prio_urgency' are from tab 'Source of Supply' tab:
09-15-2014 4:11 PM
Hi Felipe,
Those fields doesn't exists in the PR, perhaps they are hidden.
Can you show me please how to make them visible in the Source of Supply Tab?
Thanks Felipe
09-15-2014 5:04 PM
Hi Felipe,
I have found this note about fields PRIO_URG and PRIO_REQ
840488 - Priority fields in ME51N do not have a function
09-15-2014 5:25 PM
09-15-2014 6:25 PM
09-15-2014 6:05 AM
Hi,
Please do the Commit Work after the BAPI and put wait for 5 seconds it may work.
Thanks & Regards
Anoop Kumar
09-15-2014 6:11 AM
Hi Annop,
Yes I have already done that, this is how I make commit..
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
prheader = wa_header
prheaderx = wa_headerx
IMPORTING
number = pw_pr_number
TABLES
return = t_return
pritem = t_item
pritemx = t_itemx
praccount = t_praccount
praccountx = t_praccountx
"pritemsource = t_itemsource
"pritemtext = t_itext
EXTENSIONIN = lt_extensionin
EXCEPTIONS
OTHERS = 1.
IF pw_pr_number IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Is it necesary to put a 5 seconds wait?
When I go to ME52N and give a value to the field ADPRI there's no problem, but when I create the PR using BAPI_PR_CREATE this field doesn't save the value I gave it
Thanks for answer
09-15-2014 6:26 AM
just check after commit wats the error avilable in the return (t_return) internal table
09-15-2014 1:48 PM
Hi Anoop,
I don't have any error, the BAPI returns the number generated for the PR, I go to ME53N to check the PR and I see all the fields sent where updated except the ADPRI field.
Thanks for answer.
09-15-2014 1:57 PM
Did you also pass value in PRIO_URGENCY field, also look for Warning messages in RETURN (not Error ones) ?
Regards,
Raymond
09-15-2014 2:26 PM
Hi Raymond,
I have updated both fields, but nothing.
DATA:
t_item LIKE TABLE OF bapimereqitemimp WITH HEADER LINE,
t_itemx LIKE TABLE OF bapimereqitemx WITH HEADER LINE,
wa_item TYPE bapimereqitemimp,
wa_itemx TYPE bapimereqitemx,
wa_item-prio_requirement = wa_gt_data-adpri.
wa_item-PRIO_URGENCY = wa_gt_data-adpri.
APPEND wa_item TO t_item.
wa_itemx-prio_requirement = 'X'.
wa_itemx-PRIO_URGENCY = 'X'.
APPEND wa_itemx TO t_itemx.
* Create the PR with the above data's.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
prheader = wa_header
prheaderx = wa_headerx
IMPORTING
number = pw_pr_number
TABLES
return = t_return
pritem = t_item
pritemx = t_itemx
praccount = t_praccount
praccountx = t_praccountx
"pritemsource = t_itemsource
"pritemtext = t_itext
EXTENSIONIN = lt_extensionin
EXCEPTIONS
OTHERS = 1.
IF pw_pr_number IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
FIELD-SYMBOLS: <retorno> like BAPIRET2.
LOOP AT t_return ASSIGNING <retorno>.
WRITE:<retorno>-message.
ENDLOOP.
09-15-2014 2:54 PM
Some translation missing ?
Nevertheless, did you get warning message in RETURN, could you perform some test on your Customizing of FM PR_PRIO_DETERMINE which converts BAPI parameter PRITEM structure BAPIMEREQITEMIMP to MEREQ_ITEM structure or set a break-point at start of this FM and check your program ?
Some Customizing may be missing, are you actually working in Aerospace & Defense Industry (SPEC 2000),; is there an activation record in table PACT, etc.
Regards,
Raymond
09-15-2014 4:16 PM
Hi Raymond,
Nope, I work in a construction company, as Felipe said, I think I must use perhaps then "Source Supply Tab", here there are two fields Priority and Urgency.
But these fields are hidden in the me51n, how can I make them visible? which part of SPRO