Conifugarate item in purchase order by Function or BAPi
Hello experts!,
I have the following problem: I need to configurate de characterstics of a material at purchase order item level. But I can´t find any BAPI neither Function Module to perform this action.
Has anyone done this before?
Thank you for your help in advance
Nice regards
Ibai
There is no function/BAPI to configure a Purchase order item.
Your best bet would be to do a recording of ME22 (and not ME22N).
Similar Messages
-
Not to include item from purchase order to the delivery order
Hi,
i need some guidance on above topic. The user requested to have the functionality not to include the item from purchase order to delivery order when the item having order balance quantity more than the available stock.
In other words, if a PO contains several items, those order balance quantity which is more than the available stock will not be included in the DO.
is the above scenario possible?
please advise.
Thanks.Hi Yue ,
u can do it , but in this case u have to make use of user exit or BADI.
option 1 .
by using user exit , u can delete/change picking/confirm qty .
option2:
while doing the PGI , do can cross check stock avail with PO qty and raise error messages.
LE_SHP_GOODSMOVEMENT --> see its documentations in se18.
Regards
Peram -
User Exit to add line item in Purchase Order
Hi SAP Gurus,
Can any body tell me which user exit is used to add the line items in Purchase Order. I want to link the Packaging material (material type - VERP) to the header material (Material type - FERT) in PO for order type NB or UB. Because our requirement is what, when we enter the finished material in PO then packaging material linked with that finished material should automatically comes into PO as a line item.
Please help me for the same.
Thanks in Advance.
Regards,
SujayHi,
You can use Function Module for this requirement.
BAPI_PO_GETDETAIL1
Bye,
Muralidhara -
Alternative items on Purchase Order
Hi Experts:
I have a question regarding the alternative items on Purchase order. If alternative item A2 is setup for item A1 from Vendor XYZ, and if we place a PO with XYZ for item A1 but they ship item A2: can we receive A2 in stock on the initial PO for A1? Dose SAP have these kind of solutions?
Thanks and best regards
Xincheng JINHi,
there is one good solution for this sort of requirement...However, the limitations are there; may be suitable for example, we order for envelopes from vendor. You may order for one type of envelope and vendor may send other type...size may be the same, one envelope with window for address and other type may not have a window....similar such situations can be easily address using the standard SAP's below example: (I implemented this already in 2 projects previously)
http://help.sap.com/saphelp_47x200/helpdata/en/9f/fb79385feddf6ae10000009b38f8cf/frameset.htm
Example: Configurable Materials in Purchasing
You are responsible for procuring office supplies for your company, including envelopes. A printing firm supplies you with envelopes featuring your company logo in various sizes, with or without an address window.
In order not to have to create separate material master records for every possible combination (e.g. C5 with window, C6 without window), you wish to use a configurable material.
You must carry out the following activities for a configurable material:
Create characteristics
Create class
Create material
Create configuration profile
Create Characteristics
You define the criteria you use to differentiate between the variants of a material (in this case, the size of the envelope and the address window) by means of characteristics. You must create a characteristic for each criterion under Logistics ® Central Functions ® Classification System ® Master Data ® Characteristics Management.
Characteristic: Size of envelope
Enter size_of_envelope in the field Characteristic.
Choose Create.
Enter the following data on the tab page Basic Data:
· Description: Size of envelopes
· Data type: Character format
· Number of characters: 20
This indicates how many characters a characteristic value may comprise.
· Select the Single value indicator in the area Value assignment.
If you set the Single value indicator, one value only may be assigned to the characteristic. For example, only one size may be chosen when you specify the dimensions of the envelopes that are to be ordered in a PO.
Enter the following data on the tab page Values:
· Enter possible values for the characteristic:
Characteristic value
Description
DIN C4
229 mm x 324 mm
DIN C5
229 mm x 162 mm
DIN "Langhülle"
218 mm x 114 mm
DIN C6
162 mm x 114 mm
· Select the Additional values indicator.
If this indicator is selected, you may also specify values that you have not yet defined here when assigning values to the characteristic.
Choose the class type 300 (variants) on the tab page Restrictions.
Choose Save.
Characteristic: Address window in envelope
Enter window_in_envelope in the field Characteristic.
Choose Create.
Enter the following data on the tab page Basic Data:
· Description: Address window in envelopes
· Data type: Character format
· Number of characters: 4
· Select the Single value indicator in the area Value assignment.
Enter the following data on the tab page Values:
· Values of characteristic: yes , no
· Do not select the Additional values indicator.
Choose the class type 300 (variants) on the tab page Restrictions.
Choose Save.
Create Class
You group several characteristics to form a class. The class is then assigned to a material.
Choose Logistics ® Central functions ® Classification system ® Master data ® Class management.
Enter the following data on the initial screen:
· Class : Envelope
· Class type: 300 (variants)
Choose Create.
Enter a short description of the class in the Description field on the tab page Basic data: Envelopes with company logo.
On the tab page Characteristics, enter the characteristics you created previously: size_of_envelope, window_in_envelope .
Choose Save.
Create Material
Choose Logistics ® Materials management ® Material master ® Create material ® Create (general) ® Immediately.
Enter the following data:
· Material: Envelope
· Industry sector: Office supplies
· Material type: Configurable material
Choose Enter.
Choose the views Basic Data 1, Basic Data 2, Purchasing, and Accounting 1.
Enter plant 0001.
Enter the following data on the tab page Basic Data 1:
· Short description of the material: Envelopes with company logo
· Base unit of measure: KI (box)
· Material group: Office supplies
On the tab page Basic Data 2, check whether the Material is configurable is selected.
On the tab page Purchasing, select the Subject to batch management indicator.
On the tab page Accounting 1, enter the following data:
· Valuation class:
· Price control: V
· Moving average price: 99.95
Choose Save.
Create Configuration Profile
In the configuration profile, you assign characteristics to the material via a class.
Choose Logistics ® Central functions ® Variant configuration ® Configuration profile ® Create.
Select Material and choose Enter .
Enter envelope in the field Material.
Choose Goto ® Profile overview.
Enter the following data:
· Priority: 01
· Profile name: Envelopes
· Class type: 300 (variants)
Choose Goto ® Class assignment and enter envelope in the Class field.
Choose Save.
Use in Purchasing
You can now create, change and display this configurable material in all purchasing documents.
Display
If a configuration already exists for the material, you can display it in the purchasing document.
Change
If the configuration of the material was adopted from a sales order or from the material master record, you can change it in the purchasing document. This may be necessary if a material with the selected characteristic value cannot be supplied (is not available) and has to be changed to the material in the quotation.
If you change the configuration of a material in the purchasing document:
A new price determination process is carried out
You do not change the original configuration in the sales order or in the material master record as a result
Subsequent changes to the sales order or the material master record do not affect the configuration in the purchasing document
Create
If no configuration yet exists for a configurable material, you can create one in the purchasing document. This may be necessary, for example, if a configurable material is to be ordered without reference to a sales order.
Subcontracting items and the archiving of the characteristic values are not supported.
For more information on configurable materials, refer to the section LO Variant Configuration. -
"All items from purchase order cannot be invoiced"
Hello,<br />
<br />
I'm on a SRM 7.0 SP 5 system (ext-classic scenario). Here i try to create an invoice with reference to a Purchase Order, but none of my Purchase Orders can be used for reference. I get the following warning message 'All items from purchase order cannot be invoiced'.<br />
<br />
- Created via POWL (create with reference -> invoice/credit memo) i always get the warning message 'All items from purchase order cannot be invoiced'. And no items are converted / can be used for invoicing. Additionally when i use the search option 'find purchase order' within the create invoice transaction i can not find any purchase order to use, it shows 'There is no search result' while there are plenty purchase orders marked with 'invoice expected'.<br />
<br />
I am able to create invoices without reference.<br />
<br />
I tried vendors set up only for 'invoice expected' and 'GR', 'invoice expected' / 'GR' / 'GR-based-IV' and 'invoice expected' only none of them works, indicators set on vendor master are correctly used on the created purchase order. Outputting PO doesn't make any difference neither.<br />
<p />
I have not set up the following (do i need to?):<br />
- Deactivated the 'CRME' transaction type, no Credit Memo transaction type has been configured/is active.<br />
- I have not defined the 'INV' transaction type as a follow-on document for my ECPO transaction type within the define transaction type transaction.<br />
- Tollerances<br />
<br />
<b>edit</b> -> i've already searched thorougly for SAP notes but no note seems to cover this particular problem.<br />
<br />
Help is very much appreciatedSolved! Added SYS attribute for back-end system in organisational scheme.
-
How to restrict the user to enter the item in purchase order?
I want to restrict user to enter the item in purchase order.
How can i do this?
Please help
AbhishekHi,
You may create a transaction variant for ME21N in SHD0 transaction. Make the item field as output only as shown below:
Result:
You may check the doc: Learning SHD0 with Example
Regards,
AKPT -
Retrieve Material group item in Purchase Order.
Hi all,
I would need to retrieve the material group from item in Purchase order to compare in Step condition in workflow.
I have a copy of WS14000075. The container from this WF hasn't this field, at least that I know.
How can to retrieve this value from purchase order?
Some idea for it?
Many Thanks,
Regards,
David.Hi Nishant,
I will obtain the material group, but I need pass to workflow the value for each item and compare it with another values obtained from Z table (this part is implemented).
I would need something similar to BO BUS2121 attribute "MaterialGroup".
Many Thanks.
Regards,
David. -
Delete item from Purchase Order
Dear All,
I want to cancel line item from Purchase Order.
But i am unable to do it as i have already made advance payment against PO/Item.
Actually advance payment was against another Item of PO but by mistake selected wrong item while f-47.
Now i want to delete item for which made avance payment and transfer advance payment with another PO item.
How to do it.
Regards
SwatiHi,
Your Issue
Lets say, you have created two items in a PO, and made adv payment against item 10 instead of 20.
Now you want to delete the item 10---
Solution
I hope you have not done any GRN to both items (10 & 20) of your PO.
Then make your item 10 as same as your item 20. (Do change the material code, order qty, price etc)
Then delete the item 20.
So with this, you have made your errorised PO item as actual item, and deleting yout actual PO item as errorised item.
This is as good as swaping the items from one item to another item in the same PO.
This will resolve your issue.
Thanks,
Srinu -
Delete the perticuler Line Items of PURCHASE ORDERS.
Hi Friends,
i want delete the perticuler Line Items of PURCHASE ORDERS.
EXAMPLE :
I HAVE ONE PO : 2000010.
IT HAVING 10 LINE ITEMS. LIKE 1 , 2 , 3 , 4 ,5 ,6 ,7 ,8 ,9 , 10.
FOR THIS PO , I WANT DELETE THE 5TH LINE ITEM.
MEAN FOR PERTICULAR PO I WANT DELETE ITS SPECIFIC LINE ITEM NO.
ANYBODY EXPLIAN..
THANKSAre you looking to do this from an ABAP program or from the PO Screens? EKPO does have a field for the Deletion Indicator. Is there a reason why you would choose to do this from an ABAP program rather than the ME22n?
-
Creating Commitment Items In Purchase Order Level
Hi Friend,
I need some information on How to create commitment items at Purchase Order item level. Any BADI's, please suggest me.
Thanks in Advanced
Shiv'.Hi dude ,
Here i am not suppose to create any new tab at item level , could you little bit clear............,
Thanks .
Shiv'. -
How to create Billing Plan in sales order using Function module /BAPI
hi,
How to create Billing Plan in sales order using Function module /BAPI
i hv check few FM such
BILLING_SCHEDULE_READ
BILLING_SCHEDULE_GET_NUMBER
BILLING_SCHEDULE_SAVE
But unable to create billing plan for a sales order.....any other method to create???Hi,
Use this link.
Create sales order with billing plan via LSMW and BAPI BUS2032
BAPI or Function to update Billing Plan in Sales Order Items
Hope this will help you.
Regards,
Vijay -
How to create purchase order using VA01 for BAPI?
how to create purchase order using VA01 for BAPI?
Hi Arun,
Please check this link
Example Program for BAPI_PO_CREATE1
Re: BAPI_PO_CREATE1
Questions in BAPI_PO_CREATE1
Problem with BAPI_PO_CREATE1
*& Report BAPI_PO_CREATE *
REPORT bapi_po_create.
Input File Declaration
TYPES: BEGIN OF ty_input_file,
column1 TYPE char50,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
column11 TYPE char50,
column12 TYPE char50,
column13 TYPE char50,
column14 TYPE char50,
column15 TYPE char50,
column16 TYPE char50,
column17 TYPE char50,
column18 TYPE char50,
END OF ty_input_file.
DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
wa_input_file TYPE ty_input_file.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',.,..',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
PARAMETERS : p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
Read presentation server file
PERFORM f1003_upload_file.
IF NOT i_input_file[] IS INITIAL.
PERFORM split_data.
ENDIF.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
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. " f4_presentation_file
*& Form f1003_upload_file
*& Upload File
FORM f1003_upload_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_input_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
ENDFORM. " f1003_upload_file
*& Form split_data
Collect data for creating Purchase Order
FORM split_data .
DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
i_services TYPE STANDARD TABLE OF bapiesllc ,
i_srvacc TYPE STANDARD TABLE OF bapiesklc,
i_return TYPE STANDARD TABLE OF bapiret2,
wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx,
wa_poitem TYPE bapimepoitem,
wa_poitemx TYPE bapimepoitemx,
wa_poitem_sch TYPE bapimeposchedule,
wa_poitem_schx TYPE bapimeposchedulx,
wa_acct_*** TYPE bapimepoaccount,
wa_acct_assx TYPE bapimepoaccountx,
wa_services TYPE bapiesllc,
wa_srvacc TYPE bapiesklc,
wa_return TYPE bapiret2,
ws_po TYPE bapimepoheader-po_number.
break gbpra8.
wa_services-pckg_no = 10.
wa_services-line_no = 1.
wa_services-outl_no = '0'.
wa_services-outl_ind = c_x.
wa_services-subpckg_no = 20.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 10.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 01.
wa_srvacc-serial_no = 01.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
LOOP AT i_input_file INTO wa_input_file.
IF wa_input_file-column2 EQ 'HD'.
wa_header-doc_type = wa_input_file-column3.
wa_header-creat_date = sy-datum.
wa_header-created_by = sy-uname.
wa_header-vendor = wa_input_file-column4.
PERFORM conversion_output USING wa_header-vendor
CHANGING wa_header-vendor.
wa_header-comp_code = 'DE03'.
wa_header-purch_org = 'DE03'.
wa_header-pur_group = 'DE1'.
wa_header-vper_start = wa_input_file-column9.
wa_header-vper_end = wa_input_file-column10.
wa_headerx-comp_code = c_x.
wa_headerx-doc_type = c_x.
wa_headerx-creat_date = c_x.
wa_headerx-created_by = c_x.
wa_headerx-vendor = c_x.
wa_headerx-purch_org = c_x.
wa_headerx-pur_group = c_x.
wa_headerx-vper_start = c_x.
wa_headerx-vper_end = c_x.
ENDIF.
IF wa_input_file-column2 EQ 'IT'.
wa_poitem-po_item = wa_input_file-column3.
wa_poitem-short_text = wa_input_file-column6.
wa_poitem-plant = wa_input_file-column8.
wa_poitem-quantity = '1'.
wa_poitem-tax_code = 'V0'.
wa_poitem-item_cat = 'D'.
wa_poitem-acctasscat = 'K'.
wa_poitem-matl_group = wa_input_file-column7.
wa_poitem-pckg_no = '10'.
APPEND wa_poitem TO i_poitem .
wa_poitemx-po_item = wa_input_file-column3.
wa_poitemx-po_itemx = c_x.
wa_poitemx-short_text = c_x.
wa_poitemx-plant = c_x.
wa_poitemx-quantity = c_x.
wa_poitemx-tax_code = c_x.
wa_poitemx-item_cat = c_x.
wa_poitemx-acctasscat = c_x.
wa_poitemx-matl_group = c_x.
wa_poitemx-pckg_no = c_x.
APPEND wa_poitemx TO i_poitemx.
wa_poitem_sch-po_item = wa_input_file-column3.
wa_poitem_sch-delivery_date = sy-datum.
APPEND wa_poitem_sch TO i_poitem_sch.
wa_poitem_schx-po_item = wa_input_file-column3.
wa_poitem_schx-po_itemx = c_x.
wa_poitem_schx-delivery_date = c_x.
APPEND wa_poitem_schx TO i_poitem_schx.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 01.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 02.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 01.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 02.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_services-pckg_no = 20.
wa_services-line_no = 2.
wa_services-service = wa_input_file-column9.
wa_services-quantity = '100'.
wa_services-gr_price = '100'.
wa_services-userf1_txt = wa_input_file-column13.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 20.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 02.
wa_srvacc-serial_no = 02.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
exppurchaseorder = ws_po
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = i_return
poitem = i_poitem
poitemx = i_poitemx
POADDRDELIVERY =
poschedule = i_poitem_sch
poschedulex = i_poitem_schx
poaccount = i_acct_***
POACCOUNTPROFITSEGMENT =
poaccountx = i_acct_assx
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
poservices = i_services
posrvaccessvalues = i_srvacc
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
break gbpra8.
LOOP AT i_return INTO wa_return.
ENDLOOP.
ENDFORM. " split_data
*& Form conversion_output
Conversion exit input
FORM conversion_output USING p_ip
CHANGING p_op.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_ip
IMPORTING
output = p_op.
ENDFORM. " conversion_output
Best regards,
raam -
How create a purchase order without imputation using bapi: BAPI_PO_CREATE1
Hello Forum
I have an request for purchase order with imputation K (cost center, EBAN-KNTTP). During the liberation of the request for purchase order, and using the Bapi: BAPI_PO_CREATE1, I want to create a Purchase Order without imputation (imputation empty or charge empty).
The system displays the following error: The request for purchase order, item (position) 10, is attributed to another order...
I imagine that is because the request for purchase order has imputation (charged) K and the purchase order will have no type of imputation (imputation empty).
However, manually, Yes, I can create the purchase order. That is, I first release, the request for purchase order. Then I create the order of purchase using ME21 and with reference to request for purchase order, and when SAP returns the items of the request for purchase order, I manually remove the imputation K, and these items to become the purchase order.
Please support me want to know how to resolve this case, why can not I create a purchase order without imputation to from the request for purchase order with imputation K, using Bapi
Thank you.
Greetings,Hi,
In the item overview of the purchase order creation screen (ME21N), you have a column Purchasing Doc and next it item no. You can give the existing purchase order number here with item no which will create a purchase order, and changes can be made wherever you require.
Hope this helps.
Thanks
Krishna. -
PURCHASE ORDER CREATION USING ALE ( BAPI )...
HI,
I DESPERATELY NEED SOME ADVISE IN CREATING A PURCHASE ORDER USING ALE....I AM VERY NEW TO ALE SO CAN ANYONE EXPLAIN IN STEPS WHAT TO BE DONE IN DETAIL....PLS HELP ME OUT IN THIS REGARD....I WILL GET SOME DATA AS INBOUND IDOCS AND I NEED TO CREATE A PURCHASE ORDER USING ALE USING BAPI( BAPI_PO_CREATE1 ).......HOPING A QUICK REPLY ASAP.....Hi Gianluca,
I need to do the same as per the original post and your answers gets me halfway there. My remaining question is how to get the PO to output the PORDCR messgage on the outbound side (also a SAP system)? Or do you have to output the PO as an ORDERS message and map that to the PORDCR message in something like XI or other middleware?
Thanks for the help.
Johan -
Open items for purchase order its very urgent
hi
my requirement is to write extract program for purchase order(me21) to extract only open items.
please provide sample code its very urgent.
thanks in advance.
points will be rewarded.
thanks
hari prasad reddycheck the below report :
REPORT ZMM_OPEN_PO_REPORT no standard page heading
line-size 255
message-id zwave.
======================================================================
Program Name : ZMM_OPEN_PO_REPORT *
Description : This report displays all Open PO Items and output *
would be PO Number,Material number and so on *
Author : Seshu *
Date : 01/24/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
01/24/07| Seshu | DEVK921979 | Initial *
D A T A D E C L A R A T I O N P A R T ***
type-pools
type-pools : slis.
Tables
tables : ekko, " Purchase order Header
ekpo, " Purchase order Item
marc. " Material with Plant data
Internal table for output.
data : begin of i_output occurs 0,
ebeln like ekko-ebeln,
matnr like ekpo-matnr,
end of i_output.
ALV Data declaration.
data : v_repid like sy-repid.
ALV Function Module Variables
DATA: gs_layout type slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat type slis_t_fieldcat_alv,
gs_print type slis_print_alv,
gt_events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
g_status_set type slis_formname value 'PF_STATUS_SET',
g_user_command type slis_formname value 'USER_COMMAND',
g_top_of_page type slis_formname value 'TOP_OF_PAGE',
g_top_of_list type slis_formname value 'TOP_OF_LIST',
g_end_of_list type slis_formname value 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
data : gr_layout_bck type slis_layout_alv.
Ranges
ranges r_eindt for eket-eindt.
initialization.
v_repid = sy-repid.
start-of-selection.
Get the data from EKKO ,EKPO and MARC Table
perform get_data_tables.
end-of-selection.
display the data in the form of ALV
perform display_data.
*& Form get_data_tables
Get the data from EKKO,EKPO and MARC Table
FORM get_data_tables.
clear : i_output.
refresh : i_output.
fill the dates in ranges
r_eindt-low = sy-datum - 7.
r_eindt-high = sy-datum + 14.
r_eindt-option = 'BT'.
r_eindt-sign = 'I'.
append r_eindt.
Get the data from EKKO,EKPO and EKET Tables
select aebeln bmatnr into table i_output
from ekko as a inner join
ekpo as b on aebeln = bebeln
inner join marc as c on cmatnr = bmatnr
inner join mara as d on dmatnr = bmatnr
inner join eket as e on eebeln = aebeln
and eebelp = bebelp
where c~beskz = 'E'
and c~werks = '1000'
and d~mtart = 'FERT'
and b~loekz = space
and b~elikz = space
and e~eindt in r_eindt.
if sy-subrc ne 0.
message e000(zwave) with 'No open purchase order found'.
endif.
ENDFORM. " get_data_tables
*& Form display_data
text
FORM display_data.
Fill the Fiedlcat
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gr_layout_bck
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = g_save
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_output
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_data
*& Form fieldcat_init
text
-->P_GT_FIELDCAT[] text
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Purchase order number
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'EBELN'.
LS_FIELDCAT-ref_fieldname = 'EBELN'.
LS_FIELDCAT-ref_tabname = 'EKKO'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
ls_fieldcat-seltext_L = 'Purchase Order'.
ls_fieldcat-seltext_M = 'Purchase Order'.
ls_fieldcat-seltext_S = 'Purchase Order'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'EKPO'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
ls_fieldcat-seltext_L = 'Material'.
ls_fieldcat-seltext_M = 'Material'.
ls_fieldcat-seltext_S = 'Material'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " fieldcat_init
Maybe you are looking for
-
Need a script to move files to folders
Hi guys. I have found a lot of similar threads but not something exactly like what I need. I have a ton of files that need to be sorted into folders of the same name. I found scripts to help me with that however, I have some variations on the files
-
Getting below errors while deploying application in Weblogic 10.3
Unable to access the selected application. Exception in AppMerge flows' progression Exception in AppMerge flows' progression VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/j
-
Hi. Is it possible to connect two external monitors to the Macbook Pro at all? Thanks Chris
-
Api for reading .cfg files
Hello everyone, Once I saw an api for reading typical .cfg files, in which ## are comments, [xx] are labels... Now I need to use it but I don't remember the api any more. Can somebody tell me which class do I have to use? Thanks a lot
-
IPad Sound Not Working, Volume High, Ringer On?
Well, this has been going on for a while now but my iPad sound just doesn't work! On YouTube the sound does work however, the ringer doesn't work anymore and out of nowhere even the application sound effects, etc. have stopped working! I'm trying to