VOFM output control routine for VT01N
I need to know what the temporary strucutre or internal table is that SAP uses for deliveries. The values eventually get stroed in table VTTP. But when using VT01N they are not there of course until it is actually saved to the DB. The output control routine that was created gets invoked or called before it is saved so I have to read from the temp or internal table SAP uses to load these values for the deliveries. Does anyone know what this table might be? I am allowing or preventing output based on some detail concerning the delieveries but none of it is stored until it is saved so I need this temp table to get to the values.
Look in INCLUDE VTTPDATA.
This is where the internal tables are defined for VT01N.
* INCLUDE VTTPDATA *
TABLES: VTTP, *VTTP,
VTTPD, *VTTPD,
VTTPVB, *VTTPVB.
DATA: BEGIN OF COMMON PART VTTPCOM.
* shipment items
* Data base contents
DATA: BEGIN OF DBVTTP OCCURS 0.
INCLUDE STRUCTURE VTTP.
DATA: END OF DBVTTP.
* New table contents
DATA: BEGIN OF XVTTP OCCURS 0. "Sortiert nach:
INCLUDE STRUCTURE VTTPVB. " MANDT TKNUM TPNUM VBELN
DATA: END OF XVTTP.
* Old table contents
DATA: BEGIN OF YVTTP OCCURS 0. "Sortiert nach:
INCLUDE STRUCTURE VTTPVB. " MANDT TKNUM TPNUM
DATA: END OF YVTTP.
* Temporary table contents
DATA: BEGIN OF LVTTP OCCURS 0.
INCLUDE STRUCTURE VTTPVB.
DATA: END OF LVTTP.
* Definition of keys
DATA: BEGIN OF VTTP_KEY,
MANDT LIKE VTTP-MANDT,
TKNUM LIKE VTTP-TKNUM,
TPNUM LIKE VTTP-TPNUM,
END OF VTTP_KEY.
* Internal table for screen processing
DATA: BEGIN OF IVTTP OCCURS 0, "Sortierkriterium wechselt !
TKNUM LIKE VTTP-TKNUM,
TPRFO LIKE VTTP-TPRFO,
TPNUM LIKE VTTP-TPNUM,
VBELN LIKE VTTP-VBELN,
VSTEL LIKE VTRLK-VSTEL,
WERKS LIKE VTTPVB-WERKS,
LAND1 LIKE VTRLK-LAND1,
PSTLZ LIKE VTRLK-PSTLZ,
KUNNR LIKE VTRLK-KUNNR,
LIFNR LIKE VTTPVB-LIFNR,
CONADDR LIKE V56IDLNT-CONADDR,
TABIX LIKE SY-TABIX,
XTRLK LIKE SY-TABIX,
BTGWC LIKE VTRLK-BTGEW,
GSGWC LIKE VTRLK-BRGEW,
VOLMC LIKE VTRLK-VOLUM,
* fields below will be updated during tree processing
BTGWD LIKE V56IQUA-BTGWD,
GSGWD LIKE V56IQUA-GSGWD,
VOLMD LIKE V56IQUA-VOLMD,
DTMEG LIKE TVTK-DTMEG,
DTMEV LIKE TVTK-DTMEV,
TKNEW LIKE VTTP-TKNUM,
SELKZ LIKE RV56A-SELTSTP,
END OF IVTTP.
* deliveries in process
DATA: BEGIN OF XTRLK OCCURS 0. "delivery headers
INCLUDE STRUCTURE VTRLK. "Sortiert nach MANDT VBELN
DATA: END OF XTRLK.
DATA: BEGIN OF XTRLP OCCURS 0. "delivery items
INCLUDE STRUCTURE VTRLP. "Sortiert nach VBELN POSNR
DATA: END OF XTRLP.
DATA: END OF COMMON PART.
If you put a breakpoint in you VOFM routine, you should be able to examine which of these has the data that you need.
If you need more info, such as header data etc
Look at these others:
* Internal tables for shipment data base
SET EXTENDED CHECK OFF.
INCLUDE vttkdata. "shipment header
INCLUDE vttpdata. "shipment item
INCLUDE vttsdata. "shipment segment
INCLUDE vbpadata. "partner
INCLUDE vtfadata. "flow
INCLUDE sadrdata. "address
This is from the top include MV56ATOP for the program run by VT01N, SAPMV56A.
You can access all of this through SE84, Information System.
Good luck
Brian
Similar Messages
-
Output Control Routine for Order Confirmation
Hi,
I have a problem in sending out order confirmation when the customer have a credit block, no order confirmation is being sent.
Checked on transaction NACE, the routine for Order Confirmation (Routine 2), returns a sy-subrc =4
when the credit block is set. What is the best way to correct this?
Thanks,
CatherineCreate the new routine in VOFM->Requirement->Output Control. Make the required changes in routine source text and assign it to output procedure (NACE).
Thank You,
Ganesh -
Routine is not activated in VOFM - Output Control for Inventory Mangmt.
Hi Guys,
I wrote an enhancement routine for invemtroy mangmt. in VOFM tcode.
Even though I actiavte the code, still the routine active box is not checked in VOFM.
I also run the program RV80HGEN to genarate the routine.. still Active box not checked in VOFM.
Anything else I need to do ?
CheersHi,
I think you may need to regenerate the VOFM routines.
Please check the SAP NOTE: SAP Note Number: 406054
Solution
Start the report RV80HGEN to include the used program in the carrier include of the calling application.
If this doesn't work, could you please kindly let us know more detail on what you coded in the routine?
Cheers,
Edited by: NI SHILIANG on Mar 17, 2010 7:31 AM -
Output Control - Message for Orders
Hi all,
i have in my system a message ZDWO ( Distribution ALE-Partner function CO-Sending immediatly-Condition ORDER TYPE) for sales orders. It works for all kind of orders except for one that hasn't automatic sending (but this type is in the list of conditions).
What can be the reason for this? depending on the partner? or on the type of sales order? or else?
Any ideas?
Thanks in advance.Hi,
You need to maintain condition records (transaction NACR) for application V1 (Sales). Once you added the missing order type condition, the system will propose the output control in VA02 for the corresponding sales order(s).
Regards,
Ferry Lianto -
Pls urgent: maintain requirements and formulas VOFM- output control
dear all
i have developed a new routine number 901 to stop printout of delivery chalan from a delivery unless post goods issue has taken place, but it is not working though i have activated it and assigned it to my output type LD00. can anyone suggest me about the same. i will be very greatful.
regards
vikas chhabra
[email protected]Hi,
I want to create a new routine for picking confirmation. but it is asking for acess key.
It would b appreciated if u xplain me how to create a new routine.
plz its urgent........
Thanks in advance
sirisha namani -
Howto Debug Requirements Output control routine?
Hi!
I want to do the following: I got an Invoice and I want to print an invoice form so I created a message (KSCHL) that shall be found under certain circumstances.
It looks like that:
FORM KOBED_663.
BREAK-POINT id Y_KOBE_663. "Transaction SAAB
* infinite loop - trick for debugging
data lv_infinite type c.
lv_infinite = 'X'.
while lv_infinite = 'X' .
* infinite loop
endwhile.
*Check requirement 662 first
PERFORM kobed_662.
IF sy-subrc = 0. "if requirement 662 is fulfilled
* do some more checking...
DATA lv_ktokd TYPE ktokd.
CLEAR lv_ktokd.
SELECT SINGLE ktokd FROM kna1 INTO lv_ktokd WHERE kunnr = komkbv3-kunrg.
IF lv_ktokd <> '0003'.
sy-subrc = 4. "requirement not fullfilled... dont find the message!
ENDIF.
ENDIF.
ENDFORM.
FORM KOBEV_663.
Now I got a invoice with no messages within it and I try to debug it because I get my new Print out even in cases I should not because requirement 663 is not fullfilled.
I made a checkpoint with transaction SAAB, I made an infinite Loop to debug with SM50 and of course I had variours and numerous breakpoints all over and everywhere. But I never stopped within KOBEV_663. Of course I got also the KOBED_663 with identical code and identical "debug"-stuff.
When I try with my invoice and VF02 going to the messages then my message is found but I did not stop in the kobev_663.
Question: What do I have to do to debug this? it lookes like the rule is not even checked at all. But in customizing the rule is there (and active of course).
I also tried logging kompletely off with /NEX and I even cleared all buffers with /$sync (its not the prod. system of course).
Please help me, I have no further idea.
ManfredHi!
First of all: thanks for your great Help! I tried all of your hints and thats the result (maybe someone with my problem comes across this thread).
@Naimesh Patel: My problem was that the message was found and I wanted to debug the requirement because I was sure, that the message not even should have been found because of not matching the requirement. I did not want to debug the process that creates the message like the print program... but in one point your Post was vital for me: RV80HGEN was missing.
@Uwe Schieferstein: Unfortunately I dont have LOG-POINTS... maybe my release is too old... I have only 640 here. The Link you posted is of course very interesting! Thanks for that.
@Rohan Leonce D'souza: Setting--> Update debugging... that was necessary! With that in combination of the RV80HGEN I think it stopped even at my Break-Point ID... to be secure I had your idea with the break USER in addition within the code.
Now I have the pain to grant forum points... I cant split them unfortunately. Only the combination of several Posts was my solution. But Thanks to all of you!
Edited by: ManfredScherer on Jan 22, 2010 8:54 AM - solved - -
Hi,
I have an enhancement to develop output determination routines for the Output types in the Shipment document to trigger outbound interface to the Freight Forwarder based on the Shipment statuses.
Need to develop 2 routines say 950,951.
SD Shipment :
Output Type Application Routine Number
ZE01 V7 9XX
ZE02 V7 9XX
Routine for ZE01.
For the Shipment document number in the table VTTK (VTTK-TKNUM),check status VTTK-STTRG = 1 (Planning completed) then the Output will be triggered.
Routine for ZE02.
For the Shipment document in the table VTTK table check the status in VTTK-STRRG = 4 (Loading End) then issue the output.
I have created the routines and wrote the code for ZE01 like below.
FORM KOBED_984.
*if status of vttk-sttrg(Overall transportation status) is 1,(Planning completed) then outputtype is triggered.
IF VTTK-STTRG = 1.
SY-SUBRC = 0.
ELSE.
SY-SUBRC = 4.
ENDIF.
ENDFORM.
This will work fine.?Or I need to consider the shipment document number anywhere.?NAST-OBJECTKEY will hold the document number.?i need to loop it.?or just the sy-subrc check is only required..?
Kindly help..
/RanjithHi,
If you really want to be 100% sure that your requirements are rechecked before output, you need to use your own entry module when processing NASt output
See e.G. in TNAPR for your output type which print program/ form entry is used and replace it by your own entry module : Then you can check your own rules again and cancel before doing the actual output( i.e. don't call the 'processing' form )
( contra : you need make a copy of standard print program )
Alternatively, you could check e.g. the userexits that are triggered when reading the document data to be printed and set the correct return code ( r.g. retcode = 4 when your validations are not met ). This will stop processing also. ( e.g. GET_DATA_USEREXIT )
The correct names of the variables etc..depend on the print program that you are actually using .
( pro : Could maybe be done without copying standard print program )
Is it still standard print program ?
rgds
Dirk -
Hi All,
I need to write a new Output control procedure for application V1/V10000 (Order Confirmation output). How do I do this?
Thanks for your help.Hi,
Go to transaction NACE. Select Application V1 and Click on Procedures to create a new procedure. You also need to maintain the output types and access sequences if are creating custom output types and access sequences.
-Kiran -
Dear All,
How to write Routines to control the execution of output types?HI,
Go to VOFM transaction, in the menu requirnment -> output control
Double click the routine number and write the code. Coopy the code from other routine and just make changes for your.
Regards,
Senthil -
VOFM(Requirements Output Control)
Hi all,
We have custom output type configured which has to be displayed alone when a invoice is created for particular customer....All this part is done...but now i need to create a form routine and a requirement which wud be assigned to this output type which would display only this output type(Zxyz) say and should'nt display other standard output types like RD01 and other output types in the invoice outptut messages.....
How to create a routine is my first question for output control.
How to right a code in the routine which wud have only ZXYZ output type in the output message for particular Invoices.....Hi,
Create a routine and assign the VOFM routine to all the other output types in the procedure except for the new one..
You can create the routine in the transaction VOFM..
In the VOFM routine have this logic.
If KOMKBV3-kunag = 'my specific customer'.
sy-subrc = 4.
ELSE.
sy-subrc = 0.
ENDIF.
Hope this helps..
Thanks
Naren -
VOFM formula on output control based on item category(PSTYV)
Hi Gurus,
I created an Output Control requirement in VOFM.
In the requirement ABAP codes, may I know how can I access the list of item lines category (looking for vbap-pstyv in particular) while I am creating the sales order in VA01, because the sales order is not saved yet, so I cannot get from table VBAP ?
Any way to find the variables available ?
Thanks in advance.
Best Regards,
Vasumathi
Edited by: komma vasumathi on Jun 22, 2009 3:26 PMHi there,
When the sales order is created, all data is stored in the internal tables 1st in USEREXIT_SAVE_DOCUMENT_PREPARE, MV45AV0V_VBAP-PSTYV_VALUES
in MV45AFZZ.
So you can refer the fields from there. Item catg is stored in XVBAP table.
But 1 doubt. Why do you want to trigger the O/p before the order is saved? Usually any O/p is triggered after saving the doc.
Once the document is saved, data is stored in data base tables & you can refer from them.
Regards,
Sivanand -
Debugging routine for output type in purchase order
HI all,
I am unable to get breakpoint to stop at a custom requirement routine for a custom output type (ZSND) for purchase order.
I created routine 901 and explicitly add 'break userid' . In ME21N, it stops at the routine. In ME22N, it did not stop at the routine.
I like to it stop during ME22N. I tried adding the custom output in ME22N in Messages details, then save. It still did not stop at the custom routine. Can anyone pls shed lights how i can make it stop ? Or could it be that no output is generated during the ME22N changes, thus it would stop at that routine in ME22N ?
thanks
JoyceHello Joyce
The first output ZSND creates the ORDERS IDoc (ME21N). For this output type you obviously have assigned the VOFM condition (somewhere in the NACE transaction).
Changing the purchase order (ME22N) should create a different output type (-> ORDCHG IDoc). The first output ZSND must not be repeated (or it is defined to be set automatically only once).
Thus, there are two explanations for your observation:
(1) The output ZSND is not created a second time using ME22N
(2) The new output (-> ORDCHG) has not been assigned to the VOFM condition 901.
(1) you can test quite easily by adding the ZSND output manually in transaction ME22N.
(2) you need to check the output customizing.
Regards
Uwe -
Hi All,
I have written a routine in output control of VOFM to check the sales order type before generating the invoice.
I am not able to find the sales order number which is generated currently before creating the invoice.
I have given the Query as below....
select single vbelv from vbfa into w_vbelv
where vbeln = komkbv3-vbeln.
But komkbv3 is giving the invoice number which is going to genearte after requirement program.
I have to get sales order number there.
Could you plz anybody help me on this...
Regards,
Sekhar DYou don't have to hit standard tables to find the sales order type, try to find it out from global variables in the debugger, it might be available somewhere in the program.
Its not possible to get the document number which is being processed currently, because number will be assigned once all check and validations are over.
Regards
Karthik D -
How to configure the requirements for output control ?
Hi ,
I have some problems in configuring the requirements for output control like following :
My aim is to make a condition check when i create an inbound delivery ( VL31N) or MIGO ...., as default in the requirement check for output , a message type will be created automatically if the it satisfies the condition in the KOBEV .....KOBEV( each sub routine was defined with a message type ( V6 ) ( if sy-subrc = 0) . And then a printing program will be triggered to print the SAPscripts form in the table "tnapr" but even if i have put sy-subrc in ( KOBEV...KOBEV ) always = 0 the printing was not executed , and in this case i do not understand the reason why , If you please to help me this .
Thanks ,Hi,
it seems that the requirement you made is not the reason why it's not printed. If you set sy-subrc to 0, this code should have no effect.
Cheers,
Stefan. -
Stop the trigger of Output Control for PO
Hi,
Can anyone help me by describe in details what I need to do to stop the trigger of automated output control ( automated FAX) when an PO item is deleted? We just don't want an Fax send out to vendor when someone delete a PO line.
I am thinking of create new requiment routine(new include with 2 FORMs KOBEV_ , KOBED) but I like to hear your suggestion relating to any configuration that could help solve the problem. It would be nice if there is a change that says: if EKPO-LOEKZ is change to 'X'(delete indicator), don't generate output and Fax.
Thanks.
I will reward points to you appropriately.Hi,
If there is an entry in the table T166C for the table EKPO and field LOEKZ..Remove the entry..
This might work..
THanks,
Naren
Message was edited by: Narendran Muthukumaran
Maybe you are looking for
-
Pl sql procedure - clarification
1) create or replace procedure sp_emp(i_ename varchar2(5), i_date date) is begin v_cmd := 'create table emp_duplicate(eno number(5), ename varchar2(20) as select eno, ename from emp e ' || 'where to_date(e.join_date,'dd-mm-yy') = ' || to_date(i_date,
-
Syncing iPod touch is like playing in the lottery
When I sync my iPod touch 4G, it'll begin its normal sync method of backing up, syncing contacts, ect... But more recently, it has been stumbling on backing up(which more or less I'll refer to as "syncing" for simplification here). It'll take about 5
-
SQL7008 after terminating ENDJRNPF process
Hi All, I'm a newbie in DB2. In an attempt to disable journaling to prepare for a client copy, I executed: ENDJRNPF FILE(R3<SID>DATA/<file name>) JRN(*FILE) However the process took a long time, so I kill the pid for ENDJRNPF. Now I'm getting SQL7008
-
Any help would be greatly appreciated. Thank you.
-
"???????" in From Field of the Java Mail
I am using Java Mail APIs for sending the mails. "From", "To", "CC", "BCC", "Subject" is set in MimeMessage. Earlier I could see "?????????" in place of both "From" and "Subject". To fix the Subject issue, I used steps given in "http://support.micros