How to create 'service' tier with functionality multiple struts apps
I am looking for some advice regarding a future project. I have 3 struts webapps (running on Tomcat 4.1.3) each with some overlapping functionality. I would like to create a 'service tier' to accommodate common functionality which can be shared between the 3 struts web apps.
What framework would best achieve this? Are EJBs the way to go? My struts apps all use DTOs so are not tied to the Action Form object. I have been looking at Spring but am not sure exactly how this will fit? Will tomcat serve my needs or do I need to migrate to something with full J2EE support. I have also considered JBOSS with Seam linking JSF to EJBs. Is this a viable option?
The service layer can be on the same machine as the struts apps although I would like to have the flexibility to move it to a separate server in the future if necessary.
I will be happy to provide more details to any who can offer me some guidance.
Hi Saish,
Thanks for your help.
I have considered both options. The main goal is to
eliminate duplicate code. However the presentation
tiers of the applications are quite different. I
will look into Martins book.
It's outstanding. One of my top five favorite books.
Would creating a jar file which is included in each
.war end up becomming a maintenance nightmare?
Depends on what you mean by ' maintenance'. In terms of onging development with your Java source, in a modern IDE, no. In terms of deployment, it does add a minor bit of complexity. However, if you are using an automated build and deployment tool such as Ant or Maven, the amount of extra work is trivial.
In your opinion what would be the advantages of
implementing the common functionality as a seperate
tier (with SPRING/EJB) vs using a JAR file and
distributing it with each app?They are not mutually exclusive. If you want to remove duplicate code, then simple refactoring is the start. As part of that refactoring, you may decide enough classes are providing similar functionality (such as transaction management, a coarse-grained public API, etc.) and create a tier. You mentioned in particular a service tier. This is a design and architectural decision. You could still completely refactor common functionality into a better design without the introduction of a new tier.
Whether to create a tier is, IMO, more art than science. Adding a tier adds complexity. However, the net effect should be to reduce system complexity. It is more 'work' to implement a true persistence tier than to simply code JDBC in model objects (or use Hibernate/JDO objects). However, as overall system complexity grows, the addition of a persistence tier adds many benefits. Business objects concern themselves solely with business logic, where as data acccess objects concern themselves with persistence. You can even have different developers with different skills specialize within a tier.
So, tiering really is a big topic. Fortunately, there are many architecture templates and design patterns to guide your decisions. "Patterns of Enterprise Architecture" (also by Fowler) compares and contrasts the more common ones. There is lively debate as to the pros and cons of different strategies. In the end, there is no cookie-cutter architecture. You will need (sometimes through the painful process of making a mistake) to see what works best for your actual system.
Finally, about remoting. Remember the first law of distributed objects, "Don't distribute your objects". There is always a performance penalty compared to an in-JVM local call. Remoting has its uses, but these should be careful architecture-level decisions. (I should concded that even this paragraph is sometimes contentious and debated).
- Saish
Similar Messages
-
How to create Drop-Down with Function Module REUSE_ALV_GRID_DISPLAY
Hi Experts,
I have used Reuse_alv_grid_display function module in my report for ALV output. I have a requirement to add drop down in one cell of my output. I have searched but all are suggesting through OOPS programing that I can not use.
If it is possible with the given scenerion , please help me how to write the code for it?
Thanks a bunch in advance.Hi,
You can check demo programs:
BCALV_EDIT_06
BCALV_EDIT_07
Hope it helps
Regards
Mansi -
How to create table maintence with function group
plz send me replay.
urgent.Hi,
Refer this:
1.
Create Maintenance Dialog
To generate the maintenance dialog for a table or view:
Choose Development ® Other tools ® Gen.tab. maint. dialog. You go to the maintenance transaction initial screen.
Enter the name of the table or view.
Choose Generated objects.
Choose Create/Change.
Confirm the maintenance module creation prompt.
Enter the generation data:
Maintenance module function group
You can put maintenance modules for several tables or views in a function group.
Authorization group
Maintenance type (one/two-level)
Maintenance screen numbers
Recording routine (standard/individual or none)
Choose Create. All components required are generated.
When a maintenance dialog is generated, an entry with an object list is created in the maintenance object description table. All tables involved are in this object list.
http://help.sap.com/saphelp_nw04/helpdata/en/a7/513477407a11d1893b0000e8323c4f/frameset.htm
2. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-8765287250fc
3. Important : u must activate Function group before generating table maintainance.
Jogdand M B -
How to create SERVICE PR using BAPI_PR_CREATE
Hi everyone,
How to create SERVICE PR using BAPI_PR_CREATE
Regards,
My Code(it doesn't work,I don't know what's wrong.):
*& Report ZWTEST
REPORT zwtest.
DATA: header TYPE bapimereqheader,
headerx TYPE bapimereqheaderx,
item LIKE TABLE OF bapimereqitemimp WITH HEADER LINE,
itemx LIKE TABLE OF bapimereqitemx WITH HEADER LINE,
account LIKE TABLE OF bapimereqaccount WITH HEADER LINE,
accountx LIKE TABLE OF bapimereqaccountx WITH HEADER LINE,
service LIKE TABLE OF bapi_srv_service_line WITH HEADER LINE,
servicex LIKE TABLE OF bapi_srv_service_linex WITH HEADER LINE,
serviceaccount LIKE TABLE OF bapi_srv_acc_data WITH HEADER LINE,
serviceaccountx LIKE TABLE OF bapi_srv_acc_datax WITH HEADER LINE,
preq_no LIKE bapimereqheader-preq_no,
lt_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
wa_return LIKE bapiret2.
header-pr_type = 'NB'."订单类型(采购)
headerx-pr_type = 'X'.
CLEAR: item.
item-preq_item = '00010'.
item-pur_group = '426'."采购组
item-short_text = '服务类PR'."短文本
item-plant = '1051'."工厂
item-matl_group = 'AS07'."物料组
item-item_cat = '9'."项目类别
item-acctasscat = 'K'."科目分配类别
item-pckg_no = '0000000001'."软件包编号
APPEND item.
CLEAR: itemx.
itemx-preq_item = '00010'.
itemx-preq_itemx = 'X'.
itemx-pur_group = 'X'."采购组
itemx-short_text = 'X'."短文本
itemx-plant = 'X'."工厂
itemx-matl_group = 'X'."物料组
itemx-item_cat = 'X'."项目类别
itemx-acctasscat = 'X'."科目分配类别
itemx-pckg_no = 'X'."软件包编号
APPEND itemx.
CLEAR: account.
account-preq_item = '00010'.
account-serial_no = '01'.
*account-quantity = '0.955'.
*account-distr_perc = '95.5'.
account-gl_account = '4205020000'.
account-costcenter = '1042000001'.
*account-co_area = 'CNOC'.
*account-profit_ctr = '9999999999'.
APPEND account.
CLEAR: accountx.
accountx-preq_item = '00010'.
accountx-serial_no = '01'.
accountx-preq_itemx = 'X'.
accountx-serial_nox = 'X'.
*accountx-quantity = 'X'.
*accountx-distr_perc = 'X'.
accountx-gl_account = 'X'.
accountx-costcenter = 'X'.
*accountx-co_area = 'X'.
*accountx-profit_ctr = 'X'.
APPEND accountx.
CLEAR: service.
service-doc_item = '00010'.
service-outline = '0000000001'.
service-srv_line = '0000000010'.
service-short_text = 'service test'.
service-quantity = '10.000'.
service-uom = 'AU'.
service-gross_price = '10.00'.
service-currency = 'CNY'.
*service-matl_group = 'AS07'."物料组
APPEND service.
CLEAR: servicex.
servicex-doc_item = '00010'.
servicex-outline = '0000000001'.
servicex-srv_line = '0000000010'.
servicex-short_text = 'X'.
servicex-quantity = 'X'.
servicex-uom = 'X'.
servicex-gross_price = 'X'.
servicex-currency = 'X'.
*servicex-matl_group = 'X'.
APPEND servicex.
CLEAR: serviceaccount.
serviceaccount-doc_item = '00010'.
serviceaccount-outline = '0000000001'.
serviceaccount-srv_line = '0000000010'.
serviceaccount-serial_no = '01'.
serviceaccount-serial_no_item = '01'.
serviceaccount-percent = '100'.
APPEND serviceaccount.
CLEAR: serviceaccountx.
serviceaccountx-doc_item = '00010'.
serviceaccountx-outline = '0000000001'.
serviceaccountx-srv_line = '0000000010'.
serviceaccountx-serial_no = '01'.
serviceaccountx-serial_no_item = 'X'.
serviceaccountx-percent = 'X'.
APPEND serviceaccountx.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
prheader = header
prheaderx = headerx
* TESTRUN =
IMPORTING
number = preq_no
* PRHEADEREXP =
TABLES
return = lt_return
pritem = item
pritemx = itemx
* PRITEMEXP =
* PRITEMSOURCE =
praccount = account
* PRACCOUNTPROITSEGMENT =
praccountx = accountx
* PRADDRDELIVERY =
* PRITEMTEXT =
* PRHEADERTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* PRVERSION =
* PRVERSIONX =
* ALLVERSIONS =
* PRCOMPONENTS =
* PRCOMPONENTSX =
* SERVICEOUTLINE =
* SERVICEOUTLINEX =
servicelines = service
servicelinesx = servicex
* SERVICELIMIT =
* SERVICELIMITX =
* SERVICECONTRACTLIMITS =
* SERVICECONTRACTLIMITSX =
serviceaccount = serviceaccount
serviceaccountx = serviceaccountx
* SERVICELONGTEXTS =
* SERIALNUMBER =
* SERIALNUMBERX =
* 处理错误消息:通过判断消息的类型,来判断BAPI是否成功
READ TABLE lt_return INTO wa_return WITH KEY type = 'E'.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
WRITE: / '成功创建采购申请', preq_no.
ENDIF.
LOOP AT lt_return INTO wa_return.
WRITE: / wa_return-message, wa_return-type, wa_return-id, wa_return-number.
ENDLOOP.see note:
1950319 - How to create service PR with BAPI_PR_CREATE.pdf -
I need your expert opinion on how to create a map with multiple conditions.
Hello.
I need your expert opinion on how to create a map with multiple conditions.
I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
How can i create a cursors within the map?
My function creates table and cursor.
Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
I would appreciate any help / advise on this.
Thank you very muchthanks a lot for your reply - i will look into this option :-)
it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
Anyway, thank you very much for your suggestion. -
How can create a JTree with cellRender is checkbox realized multiple selec
How can create a JTree with cellRender is checkbox realized multiple selection function.thanks for every
one's help.Hi,
1. Create a value node in your context name Table and set its cardinality to 0:n
2. Create 2 value attributes within the Table node name value1 and value2
3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
you have created a table and binded its value to context
Table UI properties
4.Set Selection Mode to Multi
5.Set Visible Row Count to 5
6.ScrollableColCount to 5
In your implemetaion, you can add values to table as follow:
IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
ele.setValue1(<value>);
ele.setValue2(<value>);
wdContext.nodeTable().addElement(ele);
The above code will allow you to add elements to your table node.
Regards,
Murtuza -
How does create a server with multiple Clients ?
Any people can lead me .
How does create a server with multiple Clients ?
ThanksFor a multithreaded server you will need a thread to listen and at least one thread per client. If the conversation is half duplex, one thread per client works very well, if it's full duplex you will find one thread to send and one to receive much easier to program.
I posted a Simple Socket Server that uses 1+2*clients threads. -
Function module for Create service order with reference to sales doc (RAS )
Hi All,
I have to create a service order (type SM03) with reference to sales document (doc type RAS, in other way it is called as repair order).
I have used function module 'ALM_ME_ORDER_CREATE' && 'CO_ZV_ORDER_POST' to create service order and its working fine but problem is that i am not able to create linking between repair order and service order.
Can anyone suggest me function module, BAPI to create service order with reference as sales document (RAS) so that all related details of sales document will automatically reflect to service order..
SumitTry this function module BAPI_ORDER_MAINTAIN. Just search with BAPI_ORDER* in SE37 you will get some more functions.
Regards
Kathirvel -
How to create one portlet with more apps
Hi,
How to create 10 application with one portlet on OC4J? Anybody has experience? Care to share with me.
Thank you.Hi
If you are writing application logic using JPDK or PDK, you can implement the logic/code for 1 application or 100 applications/functionality in one portlet.
Where as if you have per application you have 1 portlet you can have modularity, can be added to Portal page's portlet region where ever you want to.portlet provider(Web provider or Pl/sql provider) can contain multiple portlets.
If you go with 100 applications rendering in one portlet you need to implement 100 applications logic/code in 1 portlet, you can parameterize the portelt to show which applications can be shown at run time, for this you need to implement parameterization logic in portlet code. I can say this approach is cumbersome
Thanks
Seshagiri.Rayala
http://soabpel.wordpress.com/ -
How to create a complaint with pre-decessor document Inovice?
Hello experts,
I need create a complaint with reference to a pre-decessor document type Invoice (apart from other types such as sales order and service order). Can someone enlighten me
1) how to create an invoice in IC Web Client and backend?
2) how to create a complaint with reference to this created invoice in IC Web client and backend?
Thanks a lot!!!Hi Easwar
Thanks a lot for answering the question.
Yes I do have CRM Billing documents. But the problem is
a) either the billing document doesn't have Transfer to Accounting status Transferred or
b) a transferred billing document, but all items have error "Unable to offset billing item 90003458 0000000060" etc.
Do you know
1) how I can make a billing document have "Transferred" status? Pressing "Transfer to Accounting" button in the billing document overview page will only set the status to "Being transferred". And it's always being tranfered.
2) What does the error "Unable to offset billing item ... "mean? How to get rid of them?
Thanks a lot! -
How to create a pdf file from multiple images ?
Dear All,
I want to create a SINGLE page pdf file from two or more page size images that are combined to make a single page pdf. Again, this question is on pdfs that are made out of several, atleast two color images and a black-and-white mask for one of them.
I have such pdf files from an unknown source (the producer is edited out) whereby there are three tiff images, obtained using the well known pdfimages extractor.
When I want to make a pdf out of tiff or png or other image formats, I right click and tell Adobe Acrobat to make a pdf.
However, I dont know how I can give a command to select say, three tif images and specify which is the mask for which and then join them in a way that I get the pdf from the composite of the two color images and a mask for one of them.
Please help me out.
I am a little familiar with the pdf structure skeleton and when necessary, fixed xref tables in one of my favorite editors. A few years ago, I also wrote a bunch of javascripts to make some annotations and needed some automation and used some itext type libraries. However, I need your help in this problem as I am now rusty and forgot some of what I studied to solve my earlier problems. This is a new problem for me. Gentle hints from you would be very nice to help me in this problem. Please specify if necessary what manual and pages to read. in the pdfspec.
Best Regards
Disabled Veteran [physically handicapped]Hello Again.
On Fri, May 11, 2012 at 12:20 PM, lrosenth <[email protected]> wrote:
>
> Re: How to create a pdf file from multiple images ?
>
> created by lrosenth in PDF Language and Specifications - View the full
> discussion
> ________________________________
>
> No clue who Irving is…
>
I was hoping to have your first name so its easy for me to address you.
> I have no clue what OS platform, programming language, etc. you use so
> can’t really narrow things down.
I would gladly mention that I am working on windows platform, preferably XP.
I can also work on linux for free products that come with it.
> Also, as this is an Adobe forum, we only
> recommend Adobe products – so there may be other options that even my list
> wouldn’t include.
But adding other products, for the help of an adobe products user,
even if it outside adobe, shall add greater prestige to your company
and give impression of user-centeredness.
> If you read ISO 32000-1:2008 (aka the PDF standard), you will find the
> information about Images and Image Masks well described. I didn’t think I
> needed to repeat any of that information.
Well, just add the few pdf stanzas since you are proficient on it and
I am presently a little rusty as I mentioned. Just asking a little
extra yard, not even to go an extra mile.
> And, if you read that same document, you will see that there is NO SUCH
> THING as a “text only PDF”. All PDF documents are structured binary files.
Well, ascii format or uncompressed format that is human readable. I
know its a binary file, but human readable ascii version of it.
I hope you can give me some stanza and various other approaches
possible so I can select or combine things for myself. I see only a
miniscule number of posts claiming to have written masks in this forum
and then with no details.
Regards
Roger
Message was edited by: dying veteran
because the adobe posting system went crazy and truncated all except the first line ... dunno why -
How to create a Sales order from multiple quotations?
Hi All,
Please tell me how to create one sales order from multiple quotations?
Regards,
MaddyHello Maddy,
To create the sales order from multiple quotation, you should put the value "F - Only at item level: Always with selection option" under Quotation determination in your sales transaction type.
It will give you a pop-up to choose your quotations item while creating the sales order.
Some per-requisites are there:
1. Copy control should be maintained between your quotation and sales order.
2. Quotation should be error free and should have the status "Released"
3. Sold to party and Organization should be same in both transaction.
For more information you can check the below link:
Processing Quotations - Sales Transactions - SAP Library
Best Regards,
Dinesh -
How to create Service Order using bapi BAPI_ALM_ORDER_MAINTAIN
Hi,
I want to create the Service Order with multiple Operations & Components.
I am using this bapi BAPI_ALM_ORDER_MAINTAIN.
But this BAPI creates the service order with only one Operation at a time. Can multiple operations be created using this bapi.
If not could any one please guide to use this or other BAPI to create Service Order with multiple Operations & Components?
Thank's in advance,
ChetanRead the Documentation of the BAPI.
Operations and Components are table parameters, you can pass multiple data. did you check that.... -
How to create sap query with "or" relationship
dear experts,
I need a report to display the employee whoese WSR is
changed in the month for infotype 0007.
that is ,we want to search with selection
begda OR endda between 2008-01-01 and 2008-01-31.
how to create sap query with "or" relationship?hi use like this,
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = p_pernr
infty = '0007'
BEGDA = p_date1
ENDDA = p_date2
TABLES
infty_tab = itab .
hi use this by passing the pernr to fm and giving the dates low and high in the p_date1 and p_date2.
loop at itab where condition.
endloop.
may it helps u,
regards,
venkat. -
Problem creating Service POs with BAPI_PO_CREATE1
Hi.
I'm trying to create service POs with data that i read from an excel file, to do this I'm using the bapi: <b>BAPI_PO_CREATE1</b> I'm passing the following parameters:
IMPORT:
- poheader
- poheaderx
TABLES:
- return
- poitem
- poitemx
- poaccount
- poaccountx
- poservices
- posrvaccessvalues
- poservices text
- extensionin
When I execute the bapi, I'm getting the following messages into table return:
<i>W - Error transferring ExtensionIn data for enhancement CI_EKKODB
E - No instance of object type PurchaseOrder has been created. External reference:
E - PO header data still faulty
E - Purchase order date is in the past
I - Change WBS Element could not be effected
E - You cannot maintain service specs. due to incomplete transfer structure</i>
Can anybody, please say me what am i doing wrong? How this bapi works?
Regards.
Gregory.Hello My friend
Check this code:
Code listing for: LZMMIUP001F01
Description: Include LZMMIUP001F01
***INCLUDE LZMMIUP001F01 .
*& Form fill_item
text
-->P_WA text
FORM fill_item TABLES: poitem STRUCTURE bapimepoitem "Item Data
poitemx STRUCTURE bapimepoitemx "Item Data (Change Parameter
USING wa STRUCTURE zlo_mmcnv009
package.
item number
poitem-po_item = wa-itemnum.
poitemx-po_itemx = 'X'.
poitemx-po_item = wa-itemnum.
IF package <> ''.
poitem-pckg_no = package.
poitemx-pckg_no = 'X'.
ENDIF.
*Account Assignment Category
IF wa-category <> ''.
poitem-acctasscat = wa-category.
poitemx-acctasscat = 'X'.
ENDIF.
*Item Category in Purchasing Document
IF wa-itemcat <> ''.
poitem-item_cat = wa-itemcat.
poitemx-item_cat = 'X'.
ENDIF.
*Short Text
IF wa-sortxt <> ''.
poitem-short_text = wa-sortxt.
poitemx-short_text = 'X'.
ENDIF.
*Material Number
IF wa-material <> ''.
poitem-material = wa-material.
poitemx-material = 'X'.
ENDIF.
Unit of Measure
IF wa-undmesure <> ''.
poitem-po_unit = wa-undmesure.
poitemx-po_unit = 'X'.
ENDIF.
*Purchase Order Quantity
IF wa-quantity <> ''.
poitem-quantity = wa-quantity.
poitemx-quantity = 'X'.
ENDIF.
*Net Price in Purchasing Document
IF wa-netprice <> ''.
poitem-net_price = wa-netprice.
poitemx-net_price = 'X'.
ENDIF.
*Plant
IF wa-plant <> ''.
poitem-plant = wa-plant.
poitemx-plant = 'X'.
ENDIF.
*Material Group
IF wa-matgrp <> ''.
poitem-matl_group = wa-matgrp.
poitemx-matl_group = 'X'.
ENDIF.
*Free Item
IF wa-free <> ''.
poitem-free_item = wa-free.
poitemx-free_item = 'X'.
ENDIF.
APPEND poitem.
APPEND poitemx.
ENDFORM. " fill_item
*& Form fill_header
text
-->P_WA text
FORM fill_header USING wa STRUCTURE zlo_mmcnv009
poheader STRUCTURE bapimepoheader "Header Data
poheaderx STRUCTURE bapimepoheaderx. "Header Data (Change Toolbar)
DATA: dia(2), mes(2), ano(4),
vendor(10) TYPE n.
dia = wa-docdate(2).
mes = wa-docdate+2(2).
ano = wa-docdate+4(4).
CONCATENATE ano mes dia INTO wa-docdate.
dia = wa-datestart(2).
mes = wa-datestart+2(2).
ano = wa-datestart+4(4).
CONCATENATE ano mes dia INTO wa-datestart.
dia = wa-datend(2).
mes = wa-datend+2(2).
ano = wa-datend+4(4).
CONCATENATE ano mes dia INTO wa-datend.
Document Type
IF wa-doctyp <> ''.
poheader-doc_type = wa-doctyp.
poheaderx-doc_type = 'X'.
ENDIF.
vendor number
IF wa-vendor <> ''.
IF NOT ( wa-vendor CA sy-abcde ).
vendor = wa-vendor.
poheader-vendor = vendor.
poheaderx-vendor = 'X'.
ELSE.
poheader-vendor = wa-vendor.
poheaderx-vendor = 'X'.
ENDIF.
ENDIF.
Document Date
IF wa-docdate <> ''.
poheader-doc_date = wa-docdate.
poheaderx-doc_date = 'X'.
ENDIF.
purchasing organization
IF wa-organiz <> ''.
poheader-purch_org = wa-organiz.
poheaderx-purch_org = 'X'.
ENDIF.
Purchasing Group
IF wa-purgroup <> ''.
poheader-pur_group = wa-purgroup.
poheaderx-pur_group = 'X'.
ENDIF.
Start of Validity Period
IF wa-datestart <> ''.
poheader-vper_start = wa-datestart.
poheaderx-vper_start = 'X'.
ENDIF.
End of Validity Period
IF wa-datend <> ''.
poheader-vper_end = wa-datend.
poheaderx-vper_end = 'X'.
ENDIF.
Company Code
IF wa-compcode <> ''.
poheader-comp_code = wa-compcode.
poheaderx-comp_code = 'X'.
ENDIF.
Status of Purchasing Document
IF wa-status <> ''.
poheader-status = wa-status.
poheaderx-status = 'X'.
ENDIF.
ENDFORM. " fill_header
*& Form fill_account
text
-->P_WA text
FORM fill_account TABLES poaccount STRUCTURE bapimepoaccount
poaccountx STRUCTURE bapimepoaccountx
USING wa STRUCTURE zlo_mmcnv009.
DATA: account(10) TYPE n.
poaccount-po_item = wa-itemnum.
poaccountx-po_item = wa-itemnum.
*Cost Centre
poaccount-costcenter = wa-coscenter.
poaccountx-costcenter = 'X'.
*Order Number
poaccount-orderid = wa-ordernumb.
poaccountx-orderid = 'X'.
*"G/L Account Number
IF wa-accnumb <> ''.
account = wa-accnumb.
poaccount-gl_account = account."wa-accnumb.
poaccountx-gl_account = 'X'.
ENDIF.
IF NOT ( wa-coscenter = '' AND
wa-ordernumb = '' AND
wa-accnumb = '' ).
APPEND poaccount.
APPEND poaccountx.
ENDIF.
ENDFORM. " fill_account
*& Form fill_schedule
text
-->P_WA text
FORM fill_schedule TABLES poschedule STRUCTURE bapimeposchedule
poschedulex STRUCTURE bapimeposchedulx
USING wa STRUCTURE zlo_mmcnv009.
DATA: dia(2), mes(2), ano(4).
dia = wa-delivdate(2).
mes = wa-delivdate+2(2).
ano = wa-delivdate+4(4).
CONCATENATE ano mes dia INTO wa-delivdate.
*Delivery Date
poschedule-po_item = wa-itemnum.
poschedulex-po_item = wa-itemnum.
poschedule-delivery_date = wa-delivdate.
poschedulex-delivery_date = 'X'.
IF NOT wa-delivdate = ''.
APPEND poschedule.
APPEND poschedulex.
ENDIF.
ENDFORM. " fill_schedule
*& Form fill_header_contract
text
-->P_WA text
-->P_HEADER text
-->P_HEADERX text
FORM fill_header_contract USING wa STRUCTURE zlo_mmcnv009
coheader STRUCTURE bapimeoutheader
coheaderx STRUCTURE bapimeoutheaderx.
DATA: dia(2), mes(2), ano(4).
dia = wa-datestart(2).
mes = wa-datestart+2(2).
ano = wa-datestart+4(4).
CONCATENATE ano mes dia INTO wa-datestart.
dia = wa-datend(2).
mes = wa-datend+2(2).
ano = wa-datend+4(4).
CONCATENATE ano mes dia INTO wa-datend.
Purchasing Document Date
coheader-doc_date = sy-datum.
coheaderx-doc_date = 'X'.
*Item Number Interval
coheader-item_intvl = '10'.
coheaderx-item_intvl = 'X'.
Currency Key
coheader-currency = 'BHD'.
coheaderx-currency = 'X'.
languaje
coheader-langu = 'EN'.
coheaderx-langu = 'X'.
Document Type
IF wa-doctyp <> ''.
coheader-doc_type = wa-doctyp.
coheaderx-doc_type = 'X'.
ENDIF.
vendor number
IF wa-vendor <> ''.
coheader-vendor = wa-vendor.
coheaderx-vendor = 'X'.
ENDIF.
purchasing organization
IF wa-organiz <> ''.
coheader-purch_org = wa-organiz.
coheaderx-purch_org = 'X'.
ENDIF.
Purchasing Group
IF wa-purgroup <> ''.
coheader-pur_group = wa-purgroup.
coheaderx-pur_group = 'X'.
ENDIF.
Start of Validity Period
IF wa-datestart <> ''.
coheader-vper_start = wa-datestart.
coheaderx-vper_start = 'X'.
ENDIF.
End of Validity Period
IF wa-datend <> ''.
coheader-vper_end = wa-datend.
coheaderx-vper_end = 'X'.
ENDIF.
ENDFORM. " fill_header_contract
*& Form fill_item_contract
text
-->P_WA text
-->P_COITEM text
-->P_COITEMX text
FORM fill_item_contract TABLES: coitem STRUCTURE bapimeoutitem
coitemx STRUCTURE bapimeoutitemx
USING wa STRUCTURE zlo_mmcnv009.
item number
coitem-item_no = wa-itemnum.
coitemx-item_no = wa-itemnum.
coitemx-item_nox = 'X'.
*Material Number
IF wa-material <> ''.
coitem-material = wa-material.
coitemx-material = 'X'.
ENDIF.
*Target Quantity
IF wa-quantity <> ''.
coitem-target_qty = wa-quantity.
coitemx-target_qty = 'X'.
ENDIF.
*Net Price in Purchasing Document
IF wa-netprice <> ''.
coitem-net_price = wa-netprice.
coitemx-net_price = 'X'.
ENDIF.
APPEND coitem.
APPEND coitemx.
ENDFORM. " fill_item_contract
*& Form fill_service
text
-->P_POSERVICES text
-->P_T_ITEM text
-->P_ITEMNUM text
FORM fill_service TABLES poservices STRUCTURE bapiesllc
t_item STRUCTURE zlo_mmcnv009
poservices_2 STRUCTURE bapiesklc
USING itemnum packno.
DATA: line(10) TYPE n,
service(18) TYPE n,
packno2(10) TYPE n.
poservices-pckg_no = packno.
packno2 = packno.
packno = packno + 1.
poservices-line_no = '0000000001'.
poservices-outl_ind = 'X'.
poservices-subpckg_no = packno.
APPEND poservices.
line = '0000000002'.
LOOP AT t_item WHERE itemnum = itemnum.
IF t_item-activity <> ''.
IF NOT ( t_item-activity CA sy-abcde ).
service = t_item-activity.
poservices-service = service.
ELSE.
poservices-service = t_item-activity.
ENDIF.
ELSE.
poservices-service = t_item-activity.
ENDIF.
poservices-pckg_no = packno.
poservices-line_no = line. "itemnum.
poservices-ext_line = t_item-line.
poservices-quantity = t_item-quantity1.
poservices-base_uom = t_item-undmed.
poservices-gr_price = t_item-price.
poservices-short_text = t_item-shortxt.
poservices-subpckg_no = '0000000000'.
poservices-outl_ind = ''.
APPEND poservices.
poservices_2-pckg_no = packno.
poservices_2-line_no = line.
poservices_2-SERNO_LINE =
poservices_2-SERIAL_NO =
poservices_2-quantity = t_item-quantity1.
poservices_2-net_value = t_item-price.
APPEND poservices_2.
line = line + 1.
ENDLOOP.
ENDFORM. " fill_service
*& Form fill_pocond
text
-->P_POCOND text
-->P_POCONDX text
-->P_WA text
FORM fill_pocond TABLES pocond STRUCTURE bapimepocond
pocondx STRUCTURE bapimepocondx
USING wa STRUCTURE zlo_mmcnv009.
*Net Price in Purchasing Document
IF wa-netprice <> ''.
pocond-itm_number = wa-itemnum.
pocondx-itm_number = wa-itemnum.
pocond-cond_value = wa-netprice.
pocondx-cond_value = 'X'.
pocond-currency = 'BHD'.
pocondx-currency = 'X'.
pocond-cond_type = 'PBXX'.
pocondx-cond_type = 'X'.
*COND_TYPE
APPEND pocond.
APPEND pocondx.
ENDIF.
ENDFORM. " fill_pocond
Maybe you are looking for
-
Adobe Photoshop CC 2014 will not run on Windows XP
I have downloaded & installed " Adobe Photoshop CC 2014 " trial version in my machine of Windows XP, SP-3, 32, bit. After installing when clicking icon of " Adobe photoshop CC " , browser is not opening & message is giving " The procedure entry point
-
HT204291 No sound using Apple TV mirroring
I have setup an Apple TV (2nd) and an iPhone 4S, and it works perfectly when I listen to music and watch a news update video from the national tv station. However, when I try to see a movie from Voddler or a news video update from another TV station,
-
Hi Sap, I did my configuration for spl GL G gurantee received and paid in OBXR&OBYR as well i saw that in OBXS and OBXT and even i assigned my offsetting a/c for SAG in FBKA But when i post either from F-38 or F-55 system saying "Balancing filed Prof
-
DPMRA.exe Error when backing up databases
We are running DPM 2012 SP1 Update 6. Everything has been running fine but recently I am getting Recovery Point failed on SQL databases mainly. I see the following error on the DPM Server. I receive the following in the Application log. Faulting appl
-
How can I erase data on TC from older MBP?
I had a 1st. Gen. MBP and all it's data was backed up on my 1TB TC. I Recently bought the new 15" MBP and restored all data I had on older version by using my TC. My problem came when I turned on the TM on my new MBP... It made a full Backup, duplica