‎2014 Sep 12 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
.
.
.
.
‎2014 Sep 13 10:51 AM
‎2014 Sep 14 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
‎2014 Sep 14 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
‎2014 Sep 15 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.
‎2014 Sep 15 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
‎2014 Sep 15 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.
‎2014 Sep 15 2:53 PM
The fields 'prio_requirement' and 'prio_urgency' are from tab 'Source of Supply' tab:
‎2014 Sep 15 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
‎2014 Sep 15 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
‎2014 Sep 15 5:25 PM
‎2014 Sep 15 6:25 PM
‎2014 Sep 15 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
‎2014 Sep 15 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
‎2014 Sep 15 6:26 AM
just check after commit wats the error avilable in the return (t_return) internal table
‎2014 Sep 15 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.
‎2014 Sep 15 1:57 PM
‎2014 Sep 15 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.
‎2014 Sep 15 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
‎2014 Sep 15 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