SMART FORM FOR PURCHASE ORDER
Hii Experts,
I am developing a smart form for purchase order. I am customizing the existing PO smart form according to the clients requirements. The customer needs fields Discount percentage, Excise duty and VAT/CST%... all these fields when i explored in transaction me23n come from a structure so the values come only at run time.. can anyone tell me the exact table and fields from where these comes so that i can retrieve it from there and display it in my smart form. The fields i need are discount percentage, excise duty and VAT/CST%. its urgent.
REPORT ZMR_PURCHASE_ORDER.
types: BEGIN OF ty_lfa1,
LIFNR TYPE lfa1-LIFNR,
MCOD1 TYPE lfa1-MCOD1,
STRAS TYPE lfa1-STRAS,
MCOD3 TYPE lfa1-mcod3,
END OF ty_lfa1.
TYPES: BEGIN OF ty_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
txz01 TYPE ekpo-txz01,
menge TYPE ekpo-menge,
peinh TYPE ekpo-peinh,
brtwr TYPE ekpo-brtwr,
END OF ty_ekpo.
TYPES: BEGIN OF ty_ekko,
ebeln TYPE ekko-ebeln, "purchase doc
LIFNR TYPE ekko-LIFNR, "vendor
MCOD1 TYPE lfa1-MCOD1, "vendor name
STRAS TYPE lfa1-STRAS, "vendor add
MCOD3 TYPE lfa1-MCOD3, "vendor city
bedat TYPE ekko-bedat, "doc date
unsez TYPE ekko-unsez, "contact person
verkf TYPE ekko-verkf, "attn
telf1 TYPE ekko-telf1, "tele
ihrez TYPE ekko-ihrez, "ref
KNUMV TYPE ekko-KNUMV, "doc condition
ebelp TYPE ekpo-ebelp, "item
txz01 TYPE ekpo-txz01, "message desc
menge TYPE ekpo-menge, "qty
peinh TYPE ekpo-peinh, "rate
brtwr TYPE ekpo-brtwr, "gross
END OF ty_ekko.
TYPES: BEGIN OF ty_t685t,
kschl TYPE t685t-KSCHL,
vtext TYPE t685t-vtext,
END OF ty_t685t.
TYPES: BEGIN OF ty_line_item,
KNUMV TYPE konv-KNUMV, "condition number
STUNR TYPE konv-STUNR, "step
kposn TYPE konv-kposn, "item
KSCHL TYPE konv-KSCHL, "condition type
vtext TYPE t685t-vtext, "condition name
KAWRT TYPE konv-KAWRT, "base amt
KRECH TYPE konv-KSCHL, "calculation type
qty(13) TYPE n, "qty
kbetr TYPE konv-kbetr, "condition rate
kwert TYPE konv-kwert, "condition value
END OF ty_line_item.
data: wa_ekko TYPE zms_ekko,
wa_item TYPE zms_konv,
wa_lfa1 TYPE ty_lfa1,
wa_t685t TYPE ty_t685t,
wa_ekpo TYPE ty_ekpo.
data: it_ekko TYPE TABLE OF zms_ekko,
it_item TYPE TABLE OF zms_konv,
it_lfa1 type TABLE OF ty_lfa1,
it_t685t TYPE TABLE OF ty_t685t,
it_ekpo TYPE TABLE OF ty_ekpo.
SELECTION-SCREEN : BEGIN OF BLOCK ss_block WITH FRAME TITLE text-001.
PARAMETERS: pa_ver(2) TYPE c DEFAULT '0'.
SELECT-OPTIONS: pa_pord FOR wa_ekko-ebeln,
pa_date for wa_ekko-bedat.
SELECTION-SCREEN : END OF BLOCK ss_block.
SELECT EBELN LIFNR bedat unsez verkf telf1 ihrez knumv from ekko
into CORRESPONDING FIELDS OF TABLE it_ekko.
if pa_pord is not INITIAL.
DELETE it_ekko WHERE ebeln not in pa_pord.
endif.
if pa_date is not INITIAL.
DELETE it_ekko WHERE bedat not IN pa_date.
endif.
if it_ekko is not INITIAL.
SELECT lifnr MCOD1 STRAS MCOD3 from lfa1
INTO CORRESPONDING FIELDS OF TABLE it_lfa1
FOR ALL ENTRIES IN it_ekko
WHERE LIFNR = it_ekko-LIFNR.
SELECT ebeln ebelp txz01 menge peinh brtwr from ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekpo
FOR ALL ENTRIES IN it_ekko
WHERE EBELN = it_ekko-ebeln.
loop at it_ekko into wa_ekko.
READ TABLE it_lfa1 into wa_lfa1 WITH KEY lifnr = wa_ekko-LIFNR.
wa_ekko-MCOD1 = wa_lfa1-MCOD1.
wa_ekko-stras = wa_lfa1-stras.
wa_ekko-MCOD3 = wa_lfa1-MCOD3.
MODIFY it_ekko FROM wa_ekko TRANSPORTING MCOD1 STRAS MCOD3 WHERE ebeln = wa_ekko-ebeln.
ENDLOOP.
SELECT KNUMV STUNR KPOSN KSCHL KRECH kbetr kwert KAWRT from konv
into CORRESPONDING FIELDS OF TABLE it_item
FOR ALL ENTRIES IN it_ekko
WHERE KNUMV = it_ekko-KNUMV.
SELECT kschl vtext from t685t
INTO CORRESPONDING FIELDS OF TABLE it_t685t
FOR ALL ENTRIES IN it_item
WHERE spras = 'EN' and KSCHL = it_item-KSCHL.
LOOP AT it_item into wa_item.
READ TABLE it_t685t into wa_t685t with key KSCHL = wa_item-KSCHL.
wa_item-vtext = wa_t685t-vtext.
if wa_item-kschl = 'ZBP1'.
wa_item-qty = wa_item-KAWRT / wa_item-kbetr.
endif.
if wa_item-KRECH = 'A'.
wa_item-kbetr = wa_item-kbetr / 10.
endif.
if wa_item-kschl = 'NAVS'.
wa_item-vtext = 'Sales Tax'.
endif.
MODIFY it_item from wa_item TRANSPORTING vtext kbetr kschl qty
WHERE stunr = wa_item-STUNR and
kposn = wa_item-kposn.
ENDLOOP.
DELETE it_item WHERE kposn = '000000'.
DELETE it_item WHERE kschl <> 'ZBP1' and kschl <> 'ZD01' and kschl <> 'ZE01'
and kschl <> 'NAVS' and kschl <> 'ZSRV'.
sort it_item by kposn STUNR.
CALL FUNCTION '/1BCDWB/SF00000025'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
it_ekko = it_ekko
it_item = it_item
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
endif.
Similar Messages
-
Smart form for maint . order
hi
i have to make a smart form for maintenance order.
i would be required for following fields-
mant. order no, equipment no, maint date, task performed, purchase prder no, vendor no, spare to be used, reservation no.
kindly give the process for the same.
regards,
santoshHi Santosh
Pls see [here |http://www.sap-img.com/smartforms/sap-smart-forms.htm]
May be this will give u some inputs
Regards
Jignesh -
Standard print program & smart form for SALES ORDER
Hi,
I need
1. Print program &
2. SMART FORM
for "Sales Order".
and also please let me know how to migrate and do the required changes in smartform & print program.Hi Sameer,
Goto NACE tcode-> choose the application u want( like billing for invoice, PO)->output type->output type->processing routineon left side
Here u will find the standard program name and smartform .
Thanks,
Reward If Helpful. -
How to set print form for Purchase order in SPRO txn.
Hi,
I need to find out the name of the smartform used to print purchase order.
Cheers
SenthilHI,
go to SPRO - MM - Purchasing - Messages - Output Control - Message Types - Define Message Types for Purchase Order
select the message tyoe and then click on processing routines and you will get the form name..
Thanks & Regards,
Kiran -
Sample smart forms for sales order details
M unable to retrieve the data from database to smart form variables.Please send me some standard smart forms names for sales order report.So dat i can c how dey r declared in standard forms.
Thanks & Regards,
santhosh Kumar.Hi santosh,
here are some of the standard smartforms-print programs
Inquiry /SMB40/RVADOR01 /SMB40/SDINQ_XX
Quotation /SMB40/RVADOR01 /SMB40/SDQUO_XX
Order Confirmation /SMB40/RVADOR01 /SMB40/SDORC_XX
Cash Sales Receipt /SMB40/RVADOR01 /SMB40/SDCSH_XX
Contract /SMB40/RVADOR01 /SMB40/SDCON_XX
Scheduling Agreement /SMB40/RVADOR01 /SMB40/SDSDA_XX
Delivery Note RLE_DELNOTE /SMB40/SDDLN_XX
Invoice RLE_INVOICE /SMB40/SDINV_XX -
How to use smart form for production orders
Hello Experts,
I have a couple of questions about printing out production orders from SAP, from OPK8.
My ABAPer has developed a smart form and I am trying to use the same for the list LG01, i.e. the object list.
Since, there was no place to assign a smart form directly, so the ABAPer has copied the existing print program , defined for my ref. order type and LG01 and assigned the new smart form inside the program. This new program has now been assigned against my ref. ord type, LG01 and all the plants, as seen in screenshot below.
Now, what is happening is that when I give print for my order, a pop-up screen asks for the printer. I give LOCL , check 'print now' and then click on the print preview.
I can see the new form that has been developed and it is alright.
Then, when I click on the back arrow, once again the print pop-up screen appears. Now, when I enter LOCL, print now and click the print preview, then I see another form open up before me. I am assuming that this is some form which was pre-configured in the system, under the section 'Forms', for the same object list LG01.
Do I have to assign the new smart form under the section "Forms' also, for the ref order type and LG01? or the change in the section 'print programs' is enough for the new form to kick in? Please guide me. I tried to but it gave the error that the form is not created in English. Also , my form is a smart form, not a SAPScript or PDF form, so I wonder if that will help at all.
Requirement :- I need to suppress this second form somehow but do not know how to do it. I want that only one form, i.e. my smart form should be printed out when someone gives print from the order.
Let me know if something is not clear.
Regards
P.RHi P,
Go a few steps down and remove flags on the documents you don't want to print:
this are just suggestions, they can be changed in your production order, in CO02, menu Order->Settings->List Control.
regards,
Edgar -
Forms for Purchase order and Outline agreement
In my previous work which was in 4.7, smart tables and of course with the in-house development were used in order to activate country specific functionalities in P2P forms, such as PO, contracts, SA and RFQ printouts.
This functionalities are usually language, paper size and the content like specific country address, logos, tax display, etc.
So, the question is if the 6.0 version has any sort of localization or part of it for all or some countries that we can us as a base?No such specific settings were introduced in ECC6.0.
Better proceed with customized Forms only
Umakanth -
Hi,
I did Variant configuration..........if i entered a line item in sales order(VA01) i can see the Character and i can choose the value...like this i have a 5-10 chars and values for every line item..._I can see this fields in VA03 screen ->Extras->Configuration_
This data i need to print in Sales Order.....as a line items.(Character and Value)...if you know anyone related Table and Fileds................please give the table and field names......so that i can make the FS
Thanks in advance
Regards
DevHi,
Sales Documents VBAKUK VBAK + VBUK
VBUK Header Status and Administrative Data
VBAK Sales Document - Header Data
VBKD Sales Document - Business Data
VBUP Item Status
VBAP Sales Document - Item Data
VBPA Partners
VBFA Document Flow
VBEP Sales Document Schedule Line
VBBE Sales Requirements: Individual Records
SD Delivery Document LIPS Delivery Document item data, includes referencing PO
LIKP Delivery Document Header data
Customers KNA1 General Data
KNB1 Customer Master u2013 Co. Code Data (payment method, reconciliation acct)
KNB4 Customer Payment History
KNB5 Customer Master u2013 Dunning info
KNBK Customer Master Bank Data
KNKA Customer Master Credit Mgmt.
KNKK Customer Master Credit Control Area Data (credit limits)
KNVV Sales Area Data (terms, order probability)
KNVI Customer Master Tax Indicator
KNVP Partner Function key
KNVD Output type
KNVS Customer Master Ship Data
KLPA Customer/Vendor Link
Billing Document VBRK Billing Document Header
VBRP Billing Document Item
SD Shipping Unit VEKP Shipping Unit Item (Content)
VEPO Shipping Unit Header
Edited by: Neenu Jose on Oct 22, 2008 10:13 AM
Edited by: Neenu Jose on Oct 22, 2008 10:14 AM
Edited by: Neenu Jose on Oct 22, 2008 10:15 AM -
Hi,
I did Variant configuration..........if i entered a line item in sales order i can see the Character and i can choose the value...like this i have a 5-10 chars and values for every line item
This data i need to print in Sales Order......(Character and Value)...if you know anyone.............please give the table and field names......
Thanks in advance
Regards
DevHI,
Thanks for your reply.........
My abaper is asking .....CUOBJ field in VBAK....he needs Entries........but i cant able to find the data......How can i ????is thr ant specific Table and Fileds ....whihc i can fine CHAR and VALUES....for configurable materials in a SALES order...
Thanks in Advance
Regards
Lucky -
What is Sap Scripts for purchase order
hai,
what is the sap script or smart form for purchase order,
and how to modify the existing standerd one.
explain me in step by step.hi
Please ask question on sapscript in sapscript forum.
use sap script form medruck for PO
SmartForm /BPR3PF/MMPO_L is the standard delivered Purchase Order in 4.6c
Transaction code m/34 allows you to associate your 'Y' copy of the standad PO to your included company specific PO requirements such as company log graphic and other particulars.
Go to transaction OMFE. Tell me what you see there for the output type you are interested in. Let me take the standard output type NEU. The entry looks something like this.
NEU Purchase order 1 SAPFM06P ENTRY_NEU MEDRUCK.
The first one is your output type, next is its description, next is the medium, then the program, routine, and the form name.
You already copied the layout MEDRUCK to ZMEDRUCK. Now copy SAPFM06P to ZZSAPFM06P. Now ENTRY_NEU routine is in the include FM06PE02. You need to make your changes here to accommodate for the new field. So copy this include to ZZFM06PE02 and make your changes. Also, in ZZSAPFM06P, change the line where it says INCLUDE FM06PE02 to INCLUDE ZZFM06PE02.
Now in this routine ENTRY_NEU, there is a function module call ME_READ_PO_FOR_PRINTING which reads in the PO data from the tables. We need to copy this function module as well as this is where you will do your extra selections for the new fields. You will do the same with the other function call ME_PRINT_PO, if you need to change anything on the print.
after this to define output type...
NACE
You can track the form and the print program used for that form
NACE is used to create output type while creating the output type you will mention forms, and driver program.
that will be maintained in the table TNAPR.if you create the output type using NACE then it will be automatically visible in table NAST and TNAPR.
so check in NAST, TNAPR table
http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1989fe43b111d1896f0000e8322d00/frameset.htm
Condition records in NACE?
EX--in simple terms..take a transaction say ME21N ( Purchase Order ), u can see a Print icon there. now when u click on this icon, it has to print the PO document. Now how does it do that? when u click Print, the control gets transffered to a print program, now which program gets triggered is decided by what program name u specify in NACE.
So in NACE>EF>Output Type>NEU>processing routine--> u can see some standard program already configured( maybe SAPFM06P n form MEDRUCK )..these are the programs n sapscript that gets executed wen u say "PRINT" in the transactrion...so u can customise the print program for customer changes over here by copying the standard program n form into a Z/Y one and replacing the program names in NACE.
Yogesh N
Edited by: Yogesh N on Aug 20, 2008 3:19 AM -
For Purchase order, is any Smartform available
Hi,
for Purhcase order Medruck Script is available but I want a smart form for purchase
is there smart form available for purchase order if exists plz. give me the name.
it is very urgent.
GaneshHi Ganesh,
There is standard smartform for PO (pre-configured forms) but you have to import package :/SMB40
PO Form: /SMB40/MMPO_L
Print Program: /SMB40/FM06P
See the note 595812: it explain how to download the preconfigured smartforms.
Anyway this is an extract of that note:
Detailed information can be accessed at the site:
http://service.sap.com/preconfiguredforms OR
http://service.sap.com/smb/development/preconfiguredforms.
To download preconfigured smartform package, please:
1. Go to http://service.sap.com/installations, select tab "download".
2. On the right hand side screen, locate navigation tree node
SAP Software Distribution Center->Download->Installations and Upgrades->
Entry by Application Group.
3. In the main window (right hand side), follow the path
SAP Best Practices->Best Practices for mySAP All-in-One-> PRECONFIGURED
SMART FORMS, you can find available preconfigured smartform versions.
Here you can also download the PO smartform.
Hope this will help.
Regards,
Ferry Lianto -
About Change in Printing form of purchase order
Hello friends,
How to attach user defined SAP SCRIPT
of SMART FORM to purchase order?Hi,
Go to nace transaction,
here search for purchase order, select that i think it is EF and then select output types
there also select NEU -PO ,
then select it and choose processing routines, there u can give the prog name and smartform name.
Regards,
Sonika -
How to know which Smart-Form is being used for Purchase Order print output
Hi Gurus ,
How to find which Smart-Form and and methods/program being used for Purchase Order print output in SRM ?
In ECC we have tcode NACE where we can check all the details.Is there something similar in SRM ?
Please help.
Regards,
SauravThere is no similar transaction in SRM for your purpose. Usually if the customers customize the smartforms, they would choose to use their own form by implementing BADI BBP_OUTPUT_CHANGE_SF. Take a look into your system and see if this BADI is implemented. If so, debug it (by pressing "Print Preview" for a PO for example) and find out what form it is using. Or, if the BADI is not implemented, by default, the system uses form BBP_PO.
-
Driver program for Purchase Order form "/SMB40/MMPO_A"
Hi All
Could you please suggest me Driver program for Purchase Order form "/SMB40/MMPO_A" ?
Driver program "/SMB40/FM06P" does not have the same interface structure as this form, hence can not be used.
<< Text removed>>.
Regards
Ansh
Edited by: Matt on Mar 27, 2009 7:22 AM - Please do not offer pointsHi Ansh
see this link
[Driver program |https://forums.sdn.sap.com/click.jspa?searchID=24089230&messageID=6810108]
Regards
HAreesh Menon -
Assign Form and Output Program for Purchase Order
Hi,
in SPRO, Assign Form and Output Program for Purchase Order I see the following data:
- IMG Activity Assign Form and Output Program for Purchase Order
- View Maintenance: Data
- VV_TNAPR_EF
- TNAPR
- 007ZNEU2EF
What is 007ZNEU2EF ?
Yours faithfullyI dont have enough knowledge on this one. However i will try to clarify this
007 i think its a version
ZNEU2 its a Process type
EF Purchase order
Maybe you are looking for
-
Graphics card upgrade for HP Pavilion a1020n
Hi Everyone! I need to upgrade the Graphics card in my HP Pavilion a1020n for windows 7 Aero or windows 8. i need the graphics card to run Minecraft,Roblox,The Sims 3, Roller coaster tycoon 3, decently. Thanks This question was solved. View Solution.
-
How do i get my money back for something the app store double charged me for?
-
Changing TV Standard - CRASH! Opening iDVD'04 project
I raised this before, was hoping that the 7.0.2 update was going to fix but no. Is anyone out there from Apple? Helloooo! You have a defective product that I paid for and can't use. do you care? This is the displayed message when opening a project th
-
2 2ndG Nanos, 1 PC?
Hi all, The wife and I have 2 2nd Gen Nanos. mine is 8GB, hers is 4GB. Can I use the same instal of itunes and one liabray of songs to sync them both form the same PC? Will the PC be ok using 2 Ipods on I version of Itunes? Also, as ers is smaller, h
-
If I delete a User from the Database, will it also delete (Automatically) all the Tables, Views, etc associated with the user? If it does not delete the tables, etc what would be the best tool to use such that I get rid of all the objects under the U