Purchase order smart forms
i have copied the purchase order smart form and activated it and know i have the function moudule which need to be used in program but i am not shure how to do that can any one tell me how i need to write the coding for simple purchae order and then pass on the data to the smart form so that it displays the output.
What you do for inserting lines is to select line one of the screen table and then click the insert button.
Do this for each line in your BDC and then you only have to worry about line one of the table:
Code:
Form Add_Item_Line Tables t_Item_Data
using pu_program type Program_Name
pu_screen like sy-dynnr
pu_insert_line like sy-ucomm
pu_insert_at like sy-tabix
pu_werks like Zorder_Header-Dwerk.
Data: t_characteristics type Order_Lines,
w_Characteristic like Zorder_Line.
Perform Zbdc_Screen using pu_Program pu_Screen.
Perform Zbdc_Field using c_OkCode pu_insert_line. <----
Perform Zbdc_Screen using pu_Program pu_Screen.
Loop at t_Item_Data into w_Characteristic.
Is this actually part of the item line or is it a
Characteristic ?
Translate w_Characteristic-AtNam to Upper Case.
Case w_Characteristic-AtNam.
When 'MATNR'. " Material
Perform Zbdc_Subscript using 'VBAP-MATNR'
pu_insert_at
W_Characteristic-AtWrt.
Perform Zbdc_Subscript using 'VBAP-WERKS'
Looking at it from a modification point of view, the aim will be always to bring the line of the table that you're interested in to line one of the table
so again you only need to handle line one of the screen table. Some of the codes for this are 'POPO' in Purchase order processing, and 'SORT' in CO02:
Code:
Now loop round the P/O and delete all of those that we don't want
Loop at t_ekpo.
Keep this P/O Line item ?
MOVE SY-TABIX TO W_POPO.
PERFORM ZBDC_SCREEN USING 'SAPMV50A' '0270'.
PERFORM ZBDC_FIELD USING 'BDC_OKCODE' '=POPO'.
PERFORM ZBDC_SCREEN USING 'SAPMV50A' '0111'.
PERFORM ZBDC_FIELD USING 'RV50A-POSNR' W_POPO.
PERFORM ZBDC_FIELD USING 'BDC_OKCODE' '/00'.
Read Table t_vl31_asn with key ebeln = t_ekpo-ebeln
ebelp = t_ekpo-ebelp.
If sy-subrc <> 0.
Not found - discard this one.
PERFORM ZBDC_SCREEN USING 'SAPMV50A' '0270'.
PERFORM ZBDC_FIELD USING 'RV50A-LIPS_SELKZ(01)' 'X'.
ELSE.
Change the quantity....
WRITE T_VL31_ASN-MENGE TO W_MENGE UNIT T_VL31_ASN-LMEIN.
CONDENSE W_MENGE NO-GAPS.
PERFORM ZBDC_SCREEN USING 'SAPMV50A' '0270'.
PERFORM ZBDC_FIELD USING 'LIPS-LFIMG(01)' W_MENGE.
EndIf.
EndLoop.
Hope this helps.
Award points if found usefull.
Cheers,
Chandra Sekhar.
Similar Messages
-
Regarding building a purchase order smart form
hi guys,
i got to design a purchase order smart form which consists of 3 pages and i need to enclose " terms and conditions " on the back side of every page. To be more elaborative on first page purchase order details and back side of it " terms and conditions " and same way on other 2 pages.
how do i do it, can any one help me with this.
thank you very much
pavanHi
If the smartform purchase order is not available in your system
means you can download the form IDES and you can upload the form in ur ecc 6.0 system.we faced a similar kind of problem in our system and we did as i said.
Once you uploaded the things you can easily view the form interface and rest of the things related to smartforms.
Thanks and Regards
Arun Joseph -
Creating a Purchase Order Smart Form (Form Interface)
After reading up on all the posts about making a PO smart form I know this:
- An SAP script "medruck" is the current output
- A smartform exists for PO's named "/SMB40/MMPO_L" or "/SMB40/MMPO_A"
- You need to install an update to get those smartforms if you are using ECC 6.0
So my dilemma is that the SAP administrator is on vacation for a week, so I can't install the update to our system. I'm trying to just create it from scratch using the medruck SAP script as a reference, but I am a little confused.
Basically all I need to know is what form interface parameters do I pass in? Meaning how do I find out what structures and tables are imported into the function module when print preview is called from t-code ME22N? Can you please provide proper syntax for form interface solution or instructions on how to determine imported variables into the smartform?Hi
If the smartform purchase order is not available in your system
means you can download the form IDES and you can upload the form in ur ecc 6.0 system.we faced a similar kind of problem in our system and we did as i said.
Once you uploaded the things you can easily view the form interface and rest of the things related to smartforms.
Thanks and Regards
Arun Joseph -
Purchase order smart form - Version number and link to RFQ
Hi I am making enhancements to the purchase order smartform and wanted to print the version number (ekko-revno) on the print layout.
The structure for ekko which is being filled in at runtime from print program ZMMS_640FM06P has the field 'revno' blank. It is filling in the rest all fields. When I go into the ekko table I can see a value in this field. Does anyone know why this field is NOT being filled. I do not want to do a select on this field again in my smart form.
I would also like to know if there is a any way you can track back the RFQ number for a particular PO.
Thanks in advance..I hope It wil be there in table, check the entry & check teh work area entry.
Quotation will be available in PO item data. Keep a break point in Table and workarea.
Tx
Parthi
If helpful, reward points. -
Purchase order smart forms and scripts
i need to create a smart form and script in simple purchase order there is no requirements has given to me, can any one tell me in detail how i need to do and what are the procedures i need to follow, example code will be usefull and steps to build it.
Hi,
Go through the links mentioned below.
http://www.****************/Tutorials/Smartforms/SFMain.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
http://www.sapmaterial.com/smartform_example.html
Re: Hands on SAP Smart Forms
smartforms
A Simple Smartform Tutorial
SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
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
GS_MKPF = INT_MKPF
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.
Additional Fonts for your SMARTFORMS
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript, barcode and font attributes.
Also, you can refer to the below link for the explanation:
http://help.sap.com/saphelp_46c/helpdata/en/4b/83fb42df8f11d3969700a0c930660b/frameset.htm
Reward if helpful.
Regards,
Harini.S -
Modificatin in standard Purchase order smart forms
Hi all,
i m facing a prob.plz give guidelines to solve this problem.
I m copying standard smartform /SMB11/MMPO_L in a Prog. I want to add one colom in main window and in header window (WINHEADER and MAIN window) when ever i m adding one colum in header window (WINHEADER ) header window is disappeared in print preview . I m doing Following Steps .
1) adding one col. in line type of Table structure T_HEADER by adjusting the total length 19.50 .
2) add one text element in table structure .
3) modifying their line indexes .
after activating the samrtform , when i run it header is not displayed in the print preview .
when i revert back these changes then header is again not displayed in Print Preview .HI i check all this all is correct . i have tried one more option
first I add a coloumn in winheader table templet and adjust their length and indexes . Then activate it and with out running. i remove all the changes made and then again activate it and run it. Then header is also not displayed. while i revert all changes made.
so help me to sort out this problem .
Thanks & Regards
Nitin -
Purchase order smart form - e-mail smartform output and item attachments
Hi,
Our release is ECC5.0. By configuration the PO smartform can be e-mailed to vendor as PDF attachment by standard output medium,external send. And this already works. However, the additional functionality required is:
1.) The documents attached to the actual PO line items should also be e-mailed as attachments to the vendor.
How can I accomplish this?
Do I need to write addition logic in my print program to retrieve these attachments by PO number and send them as a seperate e-mail with attachment? OR
Is there any way to send these attachments on the same e-mail where the PO is sent as a PDF attachment. OR
Can this be done by configuration?
Regards,
K..Hi Ahmad ,
I got the same problem with a little more complexity because the mail can b send to several mails adresses ( some in copy ).
For the requirement to send also the document linked in PO's item , there's no standard solution . So you need to write a specific program for this .
You can have a look at this Sending DMS documents as Email attachments , you will find information on how to retrieve the content of the document.
Let me know if you need more explanation.
Best regards. -
How to get the Purchase Order sample form to have 2 detail regions?
I would like to use the "Purchase Order" sample form as the base, and add one more "detail header" and "detail" subform to it.
So I copy and paste the "detail header" + "detail" subforms, and position them right beneath the first "detail" subform.
It works to certain extend. I can click the "Add Item" button(s), and it would expand the respective "detail" region.
The problem comes when things get expanded to the 2nd page.
Say, I first add 5 rows to the 2nd "detail" region, everything still fits in one page;
then I keep adding rows to the 1st "detail" region, and it begins to expand to the 2nd page....
everything in the first "detail" region can still fit in the first page,
the rows in the 2nd "detail" region should get pushed to the 2nd page...
but when I look at the 2nd page of the form, the "detail header" on the 2nd page is that of the "FIRST" detail header, not the 2nd detail header!!
So, when you look at the entire form, you have
First Detail Header
some First Detail Rows
2nd Detail Header
some 2nd Detail rows
--- end of page 1---
--- page 2---
First Detail Header
some detail rows (can't tell if they belong to the first detail region or 2nd detail region)
This obviously is not right.
So, how do I fix it such that the Detail Header on the 2nd page is that of the 2nd Detail header???an update:
I have found out that the detail rows on the 2nd page are all that of the 2nd detail region.
so, it's like this:
when you look at the entire form, you have
First Detail Header
all the First Detail Rows
2nd Detail Header
some 2nd Detail rows
--- end of page 1---
--- page 2---
First Detail Header
some 2nd detail rows -
Hi
In purchase order summary form i query the purchase order with release number it is showing some amount in the headers summary form ,
Now i want to know the how this amount filed is return value.based on which values it is calculated.
ex:-My po_num:-11177 and release_num=5 once i query combination of this in the purchase order summary form it is showing in the headers amount filed is 32,054.25,
But i query from back end based this po_number po_headers_all table showing BLANKET_TOTAL_AMOUNT=3953444.9
Now i need help how amount filed calculated in the purchase order form .
thank's
NarendraHi Narendra,
blanket amount is SUM of amount for all releases under that Blanket.
Release amount is SUM of amount for all shipments for that release i.e. SUM (quantity x price) for all shipments under that release.
e.g. you have a blanket with 2 releases for the same item with unit price $ 1000.
Release 1: Quantity = 3. So here the release amount will be $ 3000 (3 x 1000).
Release 2: Quantity = 5. So here the release amount will be $ 5000 (5 x 1000).
And the blanket amount will be $ 8000 (3000 + 5000)
When you are querying using the blanket number and release number in PO summary the system is showing only the release record and corresponding amount for that. As per above example you'll see $ 3000 for 1st release and $ 5000 for 2nd release.
Now query in PO summary with blanket number and without any release number. Check the 'View Releases' checkbox and press find. You'll see the blanket and all associated releases. There the release amount will add up the total blanket amount.
Thanks
- Supro -
Hi,
Is there a standard adobe form for Purchase order.
If it is there how do i configure the standard form to trigger on
Print preview of a purchase order and also how do I attach it
to the standard output type NEU.
RegardsHi,
In ECC 6 it seem's to be a SAP Template for P.O .
Also SAP Modify the print program to add a new entry for Adobe foms .
So in transaction NACE for output type NEU set the form_entry to the new one ( i don't remember the name sorry ) , put the form with the adobe forms name and in the last colum set ti to adobe forms .
Hope it's help you .
regards. -
Purchase Order standard form?
Hi,
I am looking for standard purchase order form in ECC 6.0? Can anyone tell me what is the standard form for PO?
Is it possible to copy or import ANY CUSTOM FORM from SRM to ECC 6.0 system? If possible can you please explain details how I can do this?
Thanks in advance.hi
It all depends on what you want to Develop . (Smartform or script)
If Smartform then simply develop it as required and write a new driver program and ask u Functional Guy to create a New Output type and assign the New Form and Driver program in NACE tcode.
if Sapscript then copy MEDRUCK using SE38 : RSTXFCPY program
Form Name MEDRUCK
Source Client 000
Target Form zMEDRUCK_new
and execute.. and then change as required..
Re: Printing PO (ME22N) using SMARTFORMS
surya -
How to create purchase order report form MM function module
Dear All,
i need customized purchase order report with logo and grand total.
regards,
krishnahi,
When you are using the outline agreement for the PR and then shd use for the PO...from where this RFQ comes in the scene??
Also PR is already asigned to the source as outline agreement...
Regards
Priyanka.P
Edited by: Priyanka Paltanwale on Nov 7, 2008 6:03 AM -
Printing of tax amounts in PO Smart Form
Hi all,
I want to print the tax condition amounts calculated by a tax code for each line item in Purchase Order smart form. From which tables and fields can I get the data.
thanks in advance.Hi Viswa,
I checked in KONP table but it only contains the tax code details like condition types, condition rates. But what I need is say if a tax code "X1" contains two condition types Excise Duty and Ed. Cess and the rates are 16% and 2% respectively. This information is stored in KONP table as a condition record. I use this tax code "X1" in my purchase order line item, suppose the base value of the item is Rs.1000/-, it calculates Excise duty @16% and Ed.Cess@2% and the condition value comes to Rs.160/- and Rs.3.20 respectively. From which table I can get these values of Rs.160/- and Rs.3.20. KONP table doesn't have these values. I want to print these two values on PO smart form.
Please give me some solution. -
Problem in purchase order printout in terms of quantity
Hi Gurus,
Can you help me in this issue, we have a problem in printout of PO quantity when having a discount for example in PO qty there are 10 pcs when I put any discount (HB00,RA01 etc.) the qty in print preview/ printout is only show 1 pc only. why 1pc only display in PO qty? can you suggest solution tofix this issue?
ThanksHello,
You need to take help of technical consultant and check the the Purchase order smart form for analysing it further and solving it.
BR,
Tushar -
hi all
how to use existing purchase order smart form...whats the name and whats the print program for that.
rgds
anuSmartform of PO....
check this thread.
in ECC5.0 smartform name : /SMB40/MMPO_DE.
for smartforms,you no need to have a seperate print program.total logic will be inside of the smartform(function module).
Regards,
Srikanth.
Message was edited by: Srikanth Kidambi
Message was edited by: Srikanth Kidambi
Maybe you are looking for
-
Maint order should get TECO automatically after final Confirmation
Hi Gurus, My customer requirement is that, Maint order should get TECO automatically after final Confirmation (in IW41) of last operation. Is it possible? If yes, plz let me know the steps which I need to do. Thanks in Advanceu2026 Amol.
-
How do I make the audio files on my site download?
Hi In my site there are links to some audio files. When click the links in chrome or firefox, the audio files start playing straight away. In opera the files download. Internet explorer opens the files in windows media player. How can I make it so th
-
Music not uploading correctly?
I recently deleted an entire playlist off my iPhone from both the computer and the phone itself, but the same playlist/songs keep reappearing when I try to upload a different playlist. This is beyond frusturating, as it adds unwanted songs my Music.
-
1.0.2 erased all my contacts
Just an FYI. I did some searching on this forum and found some solutions, but none of them worked. I also learned that this has been an issue since July. My entire contact list got wiped out during sync+update. It's random so be careful.
-
File count alternating in folder when OS9 connects to Mac OS X server
Greeting All, I have a few Macs running Mac Os 9.2.2 and they connect to a Mac Pro running OS X Server 10.4.7. The problem I am having is that if there are more that say 75 files in a folder that I open to view, the files in that folder keeps jumping