Purchase Order SP required
Hi All,
I have a scenario for Purchase Order, where in case of Import, when the doc currency is USD, the tax code should always be "exempt" and even if the user tries to change the tax cde to any other, he/she should not be able to do so.
Please suggest an SP for this.
Thanks in advance,
Joseph
Ok......
Then try this one...
If @object_type='22' and @transaction_type in ('A','U')
BEGIN
If Exists (Select T1.TaxCode from [dbo].[OPOR] T0 Inner Join POR1 T1
On T0.DocEntry=T1.DocEntry
Where T0.Series=132 and T0.Currency='USD' and T1.TaxCode!='Exempt'
And T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
Select @error = -1,
@error_message = 'Please check the Tax Code'
End
End
Hope it will work......
Regards,
Rahul
Similar Messages
-
Purchase Order data requirement
Hello,
I have a requirement where I need to modify material characteristics while creating a purchase order.
In our organization we have the following scenario: there are certain materials which the sales personnel configure while creating the sales order. These configurations are just temporary.
These materials then go through an engineering department where an equipment is created using IE01. These equipments are configured while they are created. They then go through an RFQ and then get approved and a purchase order is created for them.
The configuration in IE01 needs to be retained in the purchase order; however, as the purchase order is created from the purchase requisition, the characteristics are flowing from the sales order.
Is there some way to get the characteristics from the equipment master while creating the purchase order? Perhaps, any user exit that can be used for this purpose?
Please advice.
Thanks,
Rugmaniit should map/inline with the source structure what u are going to define in 3 rd step.
or define the structure based on the flat file sequence. -
Purchase order address required as per location
Dear All,
Our client have two offices under one plant at different locations (say delhi & mumbai).From Delhi office PO are generated for both offices. When we are taking output system gives address for delhi(company code address) for both offices.We want individual address during output.Where can i make the settings?
Thanks in advance
Regards
SachinHello Sachin,
Standard SAP forms pick up the delivery address that was determined in the Purchase Order line. Normally this is either the Plant address or, if maintained, the storage location address. The storage location address can be maintained in customizing under "Enterprise structure - Definition - Materials Management - Maintain Storage Location".
The form checks the delivery addresses on the different PO lines. If these are all the same, it displays the address in the document header. If not, then it displays this per line item. If the printout does not show the PO line delivery address from the plant or storage location, the logic in the form is probably different from standard SAP logic. In this case, you should look for solving this in the Form, in combination with the standar SAP logic for determining the delivery address in the Purchase Order.
Regards,
Sjaak van den Berg -
Pending purchase orders fields required
Hi all,
For purchase orders, I need the below mentioned fields.
purchasing organization,
purchasing group,
purchasing document number,
purchasing document date and
item delivery date.
Can any one give me the Table Field Names related to this fields.?
If anyone already did work on it then please send me the code for the report as well.
Thanks in advance.
Rajpurchasing organization, - EKKO-EKORG
purchasing group,EKKO_EKGRP
purchasing document number, EKKO-EBELN
purchasing document date and EKKO-BEDAT
item delivery date. EKET-EINDT
Check the below program :
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
Thanks
Seshu -
Purchase order advance payment
Hi Friends,
Below is five requirement from my client regarding down payment and down payment request.
A) While posting down payment or down payment request Purchase order should require entry.
B) System should allowed to put purchase order for the same vendor against we posting advance payment or raising payment request.
C) If 100% advance has already paid against any purchase order, system should not allow to post any further advance against that purchase order.
D) If the 100% GRN has been done against any purchase order system should not allow to post any further advance against that purchaser order.
E) While paying advance system should consider the GRN or advance payment done against the purchase order, and system should allow the pay advance or raise the advance request less the value of advance or GRN value already done.
Your valuable input is highly appreciated.
Regards,
AshuHi,
whatever Mr.Ajay has told correct 1 & 2
The 1 and 2 are possible using field status groups. You can make the PO mandatory
The rest are not possible in standard system.
but system will propose while posting down payment r down payment request amount more than PO value warning message has accrued but it will never stop for posting ok
one more solution is with the help of ABAPer we can able to stop - Use Substitution,
Mr. Ajay below mentioned Option for EHP4 is also available for in this ME2DP also never stop - more than PO value down payment r down payment request
Its a matter of discipline... however, explore the new feature of PO advance payment in EHP4, Tcode ME2DP. May be you get few answers there
Mahesh -
Report for Vendor Invoices Parked against Purchase Order
Dear Team,
I want a report or table name where I can get the Parked Invoices against a Purchase order.My requirement is to know which are the invoices which are parked against a PO since ME2M shows Invoices posted, so bye anyway is it possible to get such report.
Regards,Invioces Parked
Transaction: MIR6 & MIR5
In MIR6, Select Held/Parked and execute to get the results.
In MIR5, Select Parked and execute to get the results.
Table: RBKP
FieldS:
Status - RBSTAT
( A - Parked
C - Parked and Held )
Inv Doc - BELNR
Fis year- GJAHR
Invoices Parked against a PO
Table: EKBE
Enter the below:
EBELN - PO Number (Enter the PO Number(s))
VGABE - Trans./event type (Enter P - Invoice Parking)
BEWTP - PO History Category (Enter T - VRe) This is optional -
Purchase order created from sale order ( third party)
Hi...
In third party sale, when sale order is created in SAP system will automatically creates Purchase requisition which can be converted into Purchase order,
My requirement is i need to identify against which sale order the above purchase order is created, do this purchase order has any reference of sale order.
Is there any way where i can track the purchase order number entered while cretion of sale order in the purchase order generated after creation of sales order.
Suggestion will be worth rewarding.
Regards
SARFARZHi
I think you are little bit confused.The PO number entered while creating the Sales order is nothing but the customer Purchase order.This we may receive in different forms.Hard copy or Mail etc.We will give this number as a reference in sales order.
Where as for third party orders, depending on the schedule line category (SD), PR will be generated.This will PR will be converted in to PO.In PO item detail, you can find account assignment tab, where you can find the sales order number.
If you want to link customer PO to the SAP PO, then you need to link the two tables.
Regards
Ramakrishna -
Automatic Flow of Tax Code in the purchase order (Service)
Dears,
My purpose is to populate the Tax Code automatically in the Service Purchase order (Account assignment U and Item Category D). The tax code in the purchase order is required for ERS.
If i maintain the tax code in the info record for a material, then the tax code is getting automatically flown from the Info record to the purchase order.
However, if I maintain the tax code in the info record for a service, then the tax code is not getting automatically flown from the Info record to the purchase order. Is there any other settings to be maintained to populate the tax code for the service purchase order?
Thanks & Regards,
RameshaHi,
The tax code in PO is at item level for stock material.
In your case you cant make it default as inforecord field is at service level(You cant make it default for every service specifications you create at item detail level)
Check the field info record in your service PO.
Regards,
Deepak. -
IDOC creation after the creation of a purchase order
Hi everybody,
I want some configuration details regardign IDOC creation. The requirement is, once i create a purchase order in one system, the details should automatciaclly transfer to other system through IDOC. could any one suggest any document or detailed procedure to accomplish the task. Thanks in advance,
Santosh.hi santosh kumar,
Creating an IDoc Segment WE31:
The segment defines the structure of the records in an IDoc. They are defined with transaction WE31.
We will define a structure to send a text from the text database.
Transaction WE31 calls the IDoc segment editor. The editor defines the fields of a
single segment structure. The thus defined IDoc segment is then created as a data
dictionary structure. You can view the created structure with SE11 and use it in an
ABAP as any TABLES declaration.
To demonstrate the use of the IDoc segment editor we will set up an example, which
allows you to send a single text from the text pool (tables STXH and STXL) as an
IDoc. These are the texts that you can see with SO10 or edit from within many
applications.
We will show the steps to define an IDoc segment YAXX_THEAD with the DDic
structure of THEAD.
To facilitate our work, we will use the "copy-from-template-tool", which reads the
definition of a DDIC structure and inserts the field and the matching definitions as
rows in the IDoc editor. You could, of course, define the structure completely
manually, but using the template makes it easier.
The tool in release 4.0b lets you use both DDIC structures or another IDoc segment
definition as a template.
The thus created structure can be edited any time. When saving, it will create a data
dictionary structure based on the definition in WE31. The DDIC structure will retain
the same name. You can view the structure as a table definition with SE11 and use it
in an ABAP the same way.
Defining the Message Type (EDMSG)
The message type defines the context under which an IDoc is transferred to its destination. It allows for using the same IDoc file format for several different applications.
Imagine the situation of sending a purchase order to a supplier. When the IDoc with
the purchase order reaches the supplier, it will be interpreted as a sales order
received from a customer, namely you.
Simultaneously you want to send the IDoc data to the supplier's warehouse to inform
it that a purchase order has been issued and is on the way.
Both IDoc receivers will receive the same IDoc format; however, the IDoc will be
tagged with a different message type. While the IDoc to the supplier will be flagged
as a purchase order (in SAP R/3 standard: message type = ORDERS), the same IDoc
sent to the warehouse should be flagged differently, so that the warehouse can
recognize the order as a mere informational copy and process it differently than a
true purchase order.
The message type together with the IDoc type determine the processing function.
The message types are stored in table EDMSG.
Defining the message type can be done from the transaction WEDI
EDMSG: Defining the message type (1)
The entry is only a base entry which tells the system that the message type is
allowed. Other transactions will use that table as a check table to validate the entry.
IT is as shown .
EDMSG: Defining the message type (1):
The entry is only a base entry which tells the system that the message type is
allowed. Other transactions will use that table as a check table to validate the entry.
Sales Orders are being created through inbound IDocs using FM 'EDI_DATA_INCOMING'. Now a Report is required to check the status of these Inbound IDocs along with Sales Orders generated against customer Purchase Orders.
Requirement:
Sales Orders are being created through inbound IDocs using FM 'EDI_DATA_INCOMING'. Now a Report is required to check the status of these Inbound IDocs along with Sales Orders generated against customer Purchase Orders.
Processing:
The report selects, 'ORDERS' IDoc numbers & status, generated between given time range, from table EDIDC. Further, it calls Function Module 'IDOC_READ_COMPLETELY' to get the IDoc details. Then required information is extracted by reading relevant field data of IDoc segments.
sampl code:
REPORT Z_EDI_FILE_LOAD_STATUS_REPORT .
Staus Report for Inbound IDOCs ( Sales Orders )
Program : Z_EDI_FILE_LOAD_STATUS_REPORT
Presented By : www.rmtiwari.com
TABLES : EDIDC.
ALV stuff
TYPE-POOLS: SLIS.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA : BEGIN OF T_REPORT OCCURS 0,
IDOC_NO TYPE EDI_DOCNUM,
IDOC_DATE TYPE SY-DATUM,
IDOC_TIME TYPE SY-UZEIT,
SORDER_NO TYPE VBELN,
STP_NO TYPE KNA1-KUNNR,
STP_NAME(35) TYPE C,
STP_PHONE(12) TYPE C,
PO_NO(15) TYPE C,
STATUS TYPE C,
S_TEXT(70) TYPE C,
ERROR(70) TYPE C,
END OF T_REPORT.
--PARAMETER--
selection-screen begin of block date with frame title TEXT-S01.
select-options: UDATE for EDIDC-UPDDAT
default SY-datum obligatory, "Changed On
UTIME for EDIDC-UPDTIM . "Changed Time
selection-screen end of block date.
INITIALIZATION.
START-OF-SELECTION.
PERFORM SHOW_STATUS_REPORT.
*& Form alv_grid
text
--> p1 text
< -- p2 text
FORM ALV_GRID.
IF GT_FIELDCAT[] IS INITIAL.
PERFORM FIELDCAT_INIT.
PERFORM LAYOUT_INIT.
PERFORM SORT_INIT.
ENDIF.
PERFORM GRID_DISPLAY.
ENDFORM. "alv_grid
*& Form layout_init
FORM LAYOUT_INIT.
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-CELL_MERGE = 'X'.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GS_LAYOUT-NO_VLINE = ' '.
GS_LAYOUT-TOTALS_BEFORE_ITEMS = ' '.
ENDFORM. " layout_init
*& Form fieldcat_init
FORM FIELDCAT_INIT.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'IDOC_NO'.
LS_FIELDCAT-KEY = 'X'.
LS_FIELDCAT-REPTEXT_DDIC = 'IDOC'.
LS_FIELDCAT-OUTPUTLEN = 10.
Fix for ALV print bug, which puts 'N/A' over last digit
Set inttype to 'N' to stop corruption of printed ALV cell.
LS_FIELDCAT-INTTYPE = 'N'.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'IDOC_DATE'.
LS_FIELDCAT-REPTEXT_DDIC = 'Creation Date'.
LS_FIELDCAT-OUTPUTLEN = 10.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'IDOC_TIME'.
LS_FIELDCAT-REPTEXT_DDIC = 'Creation Time'.
LS_FIELDCAT-OUTPUTLEN = 8.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STATUS'.
LS_FIELDCAT-REPTEXT_DDIC = 'St'.
LS_FIELDCAT-OUTPUTLEN = 2.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'ERROR'.
LS_FIELDCAT-REPTEXT_DDIC = 'Message'.
LS_FIELDCAT-OUTPUTLEN = 70.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STP_NO'.
LS_FIELDCAT-REPTEXT_DDIC = 'S.T.Party No'.
LS_FIELDCAT-OUTPUTLEN = 10.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STP_NAME'.
LS_FIELDCAT-REPTEXT_DDIC = 'Sold to Party Name'.
LS_FIELDCAT-OUTPUTLEN = 35.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'PO_NO'.
LS_FIELDCAT-REPTEXT_DDIC = 'Purch Order'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'STP_PHONE'.
LS_FIELDCAT-REPTEXT_DDIC = 'S.T.Party Phone'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO GT_FIELDCAT.
ENDFORM. "fieldcat_init
*& Form sort_init
FORM SORT_INIT.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'IDOC_DATE'.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'IDOC_TIME'.
LS_SORT-SPOS = 2.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'STATUS'.
LS_SORT-SPOS = 3.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'IDOC_NO'.
LS_SORT-SPOS = 4.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO GT_SORT.
ENDFORM. "sort_init
*& Form grid_display
FORM GRID_DISPLAY.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT
IT_SORT = GT_SORT
i_callback_program = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_DEFAULT = ' '
I_SAVE = 'X'
TABLES
T_OUTTAB = T_REPORT
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. "grid_display
*& Form COMMENT_BUILD
Processing of listheader
FORM COMMENT_BUILD USING P_FK_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
REFRESH P_FK_LIST_TOP_OF_PAGE.
List Heading : Typ H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = 'Sales Order Interface: Z_EDI_FILE_LOAD'.
APPEND LS_LINE TO P_FK_LIST_TOP_OF_PAGE.
List : Typ S
clear LS_LINE.
LS_LINE-typ = 'S'.
LS_LINE-key = 'Date Range:'.
LS_LINE-info = UDATE-low.
if not UDATE-high is initial.
write ' To ' to LS_LINE-info+30.
LS_LINE-info+36 = UDATE-high.
endif.
APPEND LS_LINE TO P_FK_LIST_TOP_OF_PAGE.
ENDFORM. " COMMENT_BUILD
FORM TOP_OF_PAGE *
Ereigniss TOP_OF_PAGE *
event TOP_OF_PAGE
FORM TOP_OF_PAGE.
PERFORM COMMENT_BUILD USING gt_LIST_TOP_OF_PAGE[].
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM. "TOP_OF_PAGE
*& Form show_status_report
FORM SHOW_STATUS_REPORT .
Report to show status.
DATA: BEGIN OF T_TEDS2 OCCURS 0.
INCLUDE STRUCTURE TEDS2.
DATA: END OF T_TEDS2.
DATA: BEGIN OF T_IDOC_CONTROL_TMP OCCURS 0.
INCLUDE STRUCTURE EDIDC.
DATA: END OF T_IDOC_CONTROL_TMP.
CONSTANTS: C_STATUS_IN_IDOC_POSTED LIKE EDIDC-STATUS VALUE '53'.
DATA : T_EDIDS TYPE STANDARD TABLE OF EDIDS WITH HEADER LINE.
DATA : T_EDIDD TYPE STANDARD TABLE OF EDIDD WITH HEADER LINE.
DATA : GV_PARTNER_SEG TYPE E1EDKA1,
GV_PO_REF_SEG TYPE E2EDK02.
Get text for status values
SELECT * FROM TEDS2 INTO TABLE T_TEDS2 WHERE LANGUA = SY-LANGU.
Read the IDoc's status after processing
SELECT * FROM EDIDC
INTO TABLE T_IDOC_CONTROL_TMP
WHERE UPDDAT IN UDATE
AND UPDTIM IN UTIME
AND MESTYP = 'ORDERS'.
LOOP AT T_IDOC_CONTROL_TMP.
IDoc has been processed, since control record changed.
READ TABLE T_TEDS2 WITH KEY STATUS = T_IDOC_CONTROL_TMP-STATUS.
T_REPORT-IDOC_NO = T_IDOC_CONTROL_TMP-DOCNUM.
T_REPORT-IDOC_DATE = T_IDOC_CONTROL_TMP-CREDAT.
T_REPORT-IDOC_TIME = T_IDOC_CONTROL_TMP-CRETIM.
T_REPORT-S_TEXT = T_TEDS2-DESCRP.
IF T_IDOC_CONTROL_TMP-STATUS = C_STATUS_IN_IDOC_POSTED.
ok status
T_REPORT-STATUS = 'S'.
ELSE.
error status
T_REPORT-STATUS = 'E'.
ENDIF.
Get IDoc details.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
DOCUMENT_NUMBER = T_REPORT-IDOC_NO
TABLES
INT_EDIDS = T_EDIDS
INT_EDIDD = T_EDIDD
EXCEPTIONS
DOCUMENT_NOT_EXIST = 1
DOCUMENT_NUMBER_INVALID = 2
OTHERS = 3.
Get Error status
READ TABLE T_EDIDS WITH KEY STATUS = T_IDOC_CONTROL_TMP-STATUS.
IF SY-SUBRC EQ 0.
REPLACE FIRST OCCURRENCE OF '&1' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA1.
REPLACE FIRST OCCURRENCE OF '&2' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA2.
REPLACE FIRST OCCURRENCE OF '&3' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA3.
REPLACE FIRST OCCURRENCE OF '&4' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA4.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA1.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA2.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA3.
REPLACE FIRST OCCURRENCE OF '&' IN T_EDIDS-STATXT
WITH T_EDIDS-STAPA4.
T_REPORT-ERROR = T_EDIDS-STATXT.
ENDIF.
LOOP AT T_EDIDD.
CASE T_EDIDD-SEGNAM.
WHEN 'E1EDKA1'.
GV_PARTNER_SEG = T_EDIDD-SDATA.
CLEAR : T_REPORT-STP_NAME.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = GV_PARTNER_SEG-PARTN
IMPORTING
OUTPUT = T_REPORT-STP_NO.
SELECT SINGLE NAME1 TELF1
INTO (T_REPORT-STP_NAME,T_REPORT-STP_PHONE)
FROM KNA1
WHERE KUNNR = T_REPORT-STP_NO.
WHEN 'E1EDK02'.
GV_PO_REF_SEG = T_EDIDD-SDATA.
T_REPORT-PO_NO = GV_PO_REF_SEG-BELNR.
ENDCASE.
ENDLOOP.
APPEND T_REPORT.
ENDLOOP .
SORT T_REPORT BY STATUS IDOC_NO.
Show Report
PERFORM ALV_GRID.
ENDFORM. " show_status_report
thanks
karthik
reward me points if usefull. -
Purchase order message Re-determination after goods issue is posted
We have a requirement to trigger special function message type (which creates a flat file) in a purchase order when goods issue for all items are posted. We have created a requirement routine for message type to check if goods issue is posted for all line items. Goods issue is posted using BAPI which uses transaction MIGO. When goods issue is posted, we want output to be triggered in purchase order. Requirement is working fine but is there any way to trigger output automatically without going to PO?
After goods issue is posted, if we go into purchase order using ME22N then we see output proposed or if we make any changes in PO then output is proposed. This will not happen in real life though.
Any suggestion will be highly appreciated. Thanks.
SanjayHello,
You can create a new output message record in NAST using RV_MESSAGE_UPDATE:
CALL FUNCTION 'RV_MESSAGE_UPDATE'
EXPORTING
msg_kappl = 'EF'
msg_objky = w_objky
TABLES
msg_xnast = itab_nast
msg_ynast = itab_nast_old
EXCEPTIONS
no_update = 1
OTHERS = 2.
Once the record is created, you may submit the program RSNAST00 to output the message.
Thanks,
Venu -
can anyone tell me all those t.codes from where i can make purchase order a required field.
i want to have control through purchase order.
is it possible to have control if i make sorting key 014 in vendor recon account. and fsg g067 contains purchase order a required field. plus bank fsg g005 also contains purchase order as compulsory field.
our problem is that whenever we see any vendors account open items , we are not able to see purchase order no in purchasing document. column.
what i know is that using ob41 i can make po as required field for posting key 39 used for adv pmnt request, plus make po as sorting key plus, fsg g067 containd po required field.
can any one help on this?we prepare pr then po then cit captures part1 then grn then cit captures part2 then miro is done.
ques 1
problem is that if we have po valuing rs 100000 and corp office makes pmnt rs 100000 then if allowed plant also can do the pmnt and sap system will not stop as when any one looks into the account of vendor whom payment is being done then po no is no reflected in purchasing document no. column
quest 2
how can we see the po no in the purch document column when we see any vendor account using t.code fbl1n.
question
plus how can we make it possible that total pmnt doesnot exceed total po value no matter how many bills are received wrt to one po and no matter what our pmnt terms are. -
Purchase order for a line item
Hi Guys,
I have got the following business sceanrio.
I have got a material "A" which can get from locally or can get from 3rd party also.
In the sales order i have entered like following.
Line item no. Material Qunatity Item category
10 A 100
20 A 500
As only 100 quantity is available in my stock i want to go with 3rd party for line item 20.
How can i go ahead in this scenario.
What would be the item categories for two line items?
If i go with Purchase order for line item 20. Where in sales order i can track that, Line item 20 is getting thru Purchase order, My requirement is to store the corresponding purchase order no for each line item getting from 3rd party (STO also).
Thank you
AnilHi Anil,
For delivery from stock use the item category TAN
For procuring it from Vendor use the item category - TAS/TAB
Check whether the ITEM CATEGORY GROUP & GENERAL ITEM CATEGORY GROUP for Material B is BANS/BANC & the Material type is HAWA.
Once you get the item category TAS/TAB, in sales order save it and go to Change to mode of the Sales Order then you can see the purchase requisition no in the Schedule line tab. Based on this Purchase Requisition a PO is created.
After you save the PO note down the PO number and then raise Goods Receipt (MIGO) with reference to the PO number.
Now you can goto MMBE and check the Stock for Material B.
Reward if helpful.
Regards
PAVAN -
Hi all,
Please help me with the table that holds the pricing condition values in purchase order.
Requirement is that abaper need the table that holds the value given against the condition type in conditions tab in PO item level, for a particular PO.
regards
sapmmlearnerHi,
EKKO - Purchase document
EKPO - Purchase document (item level)
EKPV - Shipping-Specific Data on Stock Tfr. for Purch. Doc. Item
EKET - Delivery schedule
VETVG - Delivery Due Index for Stock Transfer
EKES - Order Acceptance/Fulfillment Confirmations
EKKN - Account assignment in purchasing
EKAN - Vendor address purchasing
EKPA - Partner functions
EIPO - Item export / import data
EINA - Purchase info record (main data)
EINE - Purchase info record (organizational data)
EORD - Source list
EBAN - Purchase requisition
EBKN - Purchase Requisition Account Assignment -
Modification of Purchase order
hi guru's,
I need to modify the purchase order.My requirement is that whenever the delivery date of any item is changed the purchase order heading should be changed to modified purchase order.Is there any field to check two delivery dates.Hi,
History data will get update in CDPOS and CDDIR , u can verify the changed data in it.
About changed delivery date , new delivery date will get update in table EKET , can refer the table using EBELN and EBELP.
can Reward, if useful info. -
Configure purchase order screen
Dear Expert,
Is it possible to configure purchase order screen so that Supply Chain Planners (who create purchase orders) cannot amend the Pricing Conditions view and Net Price field? Sceen dump attached. However we want Purchasing Managers (who manage pricing conditions in the inforecords) to be able to change pricing conditions in the Purchase Order if required.
Please guide me step by step if there's a way.
Thanks>
crystal142 wrote:
> Dear Expert,
>
> Is it possible to configure purchase order screen so that Supply Chain Planners (who create purchase orders) cannot amend the Pricing Conditions view and Net Price field? Sceen dump attached. However we want Purchasing Managers (who manage pricing conditions in the inforecords) to be able to change pricing conditions in the Purchase Order if required.
>
> Please guide me step by step if there's a way.
>
> Thanks
There is no standard technique for this. You can try the following method:
Create an enhancement (at the end) in the FM PRICING_SUBSCREEN_SET_DATA
The code can check various parameters like authorization or read a custom table to determine if the conditions need to be read-only.
Set the variable trtyp_i = 'A' to make it read-only.
Please make sure to check the COMM_HEAD_I-BSTYP = 'F' (for purchase orders) and 'L' (for scheduling agreements); else it may have undesirable effects, since the FM is called from SD as well.
Regards,
Aroop
Maybe you are looking for
-
Forms/Reports 11.1.2 Load balancing on Linux
Hi, I put this on the Reports forum but didn't get a reply, it has a Forms element to it, so I thought I would post it here as well. I have three different applications which will run on a single Clustered Weblogic Environment with two Nodes. So we w
-
Hi I am new to JSP but hav programmed Java. I would like to create an JSP page that connects to a database MS SQL Server7.0 but get the following error message in JBuilder5 when I try to run: "Jsp1.jsp": org.apache.jasper.JasperException: Cannot find
-
Using SHIFT Key to change/create libraries
I recently moved my I-tunes from my PC HD to an EHD for more space. I used the "Hold Down Shift Key" when opening itunes to create a new library for the EHD. How do I delete the old library (all files are gone from it) so I can click on the Itunes de
-
How to enable Tenant Info porperty in load balacing system object
Dear All, Thanks in Advance i created one system object using template Portal tenant system,but when i select the Tenant Info in the Property list its display disable.so anyone have idea how to enable the property. thanks & regards chittya
-
Bridge and Photoshop keep coming to the front while batching
I downloaded the newest updates today and now when I run a batch from Bridge to a photoshop action the bridge and photoshop programs keep coming to the front and will no longer allow me to work on background programs or surf the net while the batch i