How to get a range of serial numbers based on the movement type? - serialization

I'm trying to figure out how to perform the task in object.
I want to get serial numbers from range A (internal) when i perform GR (101, 501) in storage location X. After quality checks, materials are transfered to storage location B via 311. After the 311 movement i want to change serials and get the new ones from another range (external)
I already defined ranges and i'm already posting GR with serials from range A. I have to figure out how to tell to SAP to get serials from the second range after posting the 311.
Thank you very much for your advice

Serial numbers are assigned in popup dialog during goods movement if they are mandatory, otherwise you should go to special dialog Goto->Serial Number. Assignment of external numbers could be done in this way:
Go to SPRO->SAP Customizing Implementation Guide->Plant Maintenance and Customer Service->Master Data in Plant Maintenance and Customer Service->Technical Objects->Serial Number Management and define profile with MMSL procedure or use existing one
Assign some equipment category (or create your custom one in OIET transaction) to your Serial Number profile
Go to SPRO->SAP Customizing Implementation Guide->Plant Maintenance and Customer Service->Master Data in Plant Maintenance and Customer Service->Technical Objects->Equipment->Equipment Categories->Define Number Ranges and assign your previously created number range to your equipment category
[optional] Also you can go to S_ALR_87000304 tcode and assign default equipment category which will be used for serial number assignment if system cannot find equipment category from the profile.

Related

How to get employee transport and accommodation allowance?

I am working on one of our HR system which have integration with SAP, I am using SAP Connector for Microsoft .NET 3.0 and it's working fine for getting basic employee data using BAPI_EMPLOYEE_GETDATA function module.
I wants to know is there any function module in SAP to get employee transport and accommodation allowances.
As far as I know there is no single allowance value for employee in SAP HR. They can be set per diem, per expense type, per country destination, etc.
The most simple and obviuos setting that came to my mind is Define Maximum Rates and Default Values for Expense Types, which is stored in V_T706B2 customizing view
Here you can configure defaults, errors and warnings for expense receipts. Here is the excerpt from help:
In this IMG activity, you define maximum rates depending on the trip provision variant and trip expense type for individual receipts. For the differentiation of maximum rates within a trip expense type, the following parameters are available:
•Statutory and enterprise-specific trip types
•Trip activity type
•Trip country and trip region
•Statutory and enterprise-specific reimbursement group for meals and accommodations
Key piece here is individual receipts, you gotta understand that travel expenses in SAP are settled per trip per destination per receipt. So it may be dozens of receipts in the single trip.
The botton line: the total allowance value per employee (per day/month/year) that you want, may not be available out of the box in SAP ERP and is coded/customized by each client. I saw multiple ways to implement it, but none of them are standard so I will not give them here. In case you are not sure which allowance type do you need, it's better to ask your customer directly about it.
The snippet how to fetch the above Maximum Rates and Default Values for Expense Types is based on standard module RFC_READ_TABLE for querying SAP tabular data.
Here we fetch T706B2 table but I want to highlight it is not equivalent to V_T706B2 view, ideally you must create a database view wrapper for V_T706B2 view and fetch it, however this may not be feasible on your system due to security policy.
The query is context-dependent and here you must know many parameters like travel provision plan MOREI, expense type SPKZL and maybe others. They should be provided by your business analyst, I give this snippet only as a reference (!), it may not be suited for your particular case.
DATA: obj_data TYPE REF TO data,
lt_options TYPE TABLE OF rfc_db_opt,
ls_option TYPE rfc_db_opt,
lt_fields TYPE TABLE OF rfc_db_fld,
ls_field TYPE rfc_db_fld,
lt_entries TYPE STANDARD TABLE OF tab512.
FIELD-SYMBOLS: <fs_tab> TYPE STANDARD TABLE.
TRY.
ls_option-text = ` MOREI = '01' AND SPKZL = 'ABZA' AND BEGDA >= '20220101' AND ENDDA <= '20221231' `.
APPEND ls_option TO lt_options.
ls_field-fieldname = 'MOREI'.
APPEND ls_field TO lt_fields.
ls_field-fieldname = 'SPKZL'.
APPEND ls_field TO lt_fields.
CALL FUNCTION 'RFC_READ_TABLE'
EXPORTING
query_table = 'T706B2'
TABLES
options = lt_options
fields = lt_fields
data = lt_entries.
CATCH CX_SY_DYNAMIC_OSQL_SYNTAX INTO DATA(oref).
DATA(text) = oref->get_text( ).
MESSAGE text TYPE 'E'.
ENDTRY.
It is an ABAP snippet, to wrap it for SAP .Net Connector check this answer.

What kind of dynamic content is available in Eloqua?

In Eloqua, can you send out an email to a contact list but version the "hero" image headline for each segment using dynamic content blocks?
And then can you do the reverse, have the main image remain the same, and dynamically populate products below that they've purchased in the past?
For scenario 1, yes that is possible out of the box.
Scenario 2 however is a bit more complicated and would generally require a 3rd party tool to provide this type of dynamic code generation based upon a lookup table (in this case a line item inventory or purchases). Because a contact could have zero or more products (commonly as individual records in a CDO), you would generally need to aggregate or count the number of related records, and then generate your HTML table and formatting around those record values, and be contextually aware if it is the first or last record (to begin and close the table). Dynamic content does not have mathematical functions and would not be able to count those related records - this is something usually provided by a B2C system like SFMC using ampscript or dynamically generated through custom code and sent through a transactional SMTP service. You could have multiple dynamic content on top of each other, but your biggest limitation becomes the field merge, with only lets you select a record based upon earliest/last creation date, or last modified. This is not suitable if you have more than 2 records. A third party service that provides a cloud content module for your email is your best bet.

Issue in VBA excel

I have a list of Data that contains a list of machines with the following columns (good parts, bad parts, production date, end date, time/1pc = means time spent for one piece to make) these informations are used to calculate the 3 performance indicators in order to get the OEE for each machine.
I've created a user form that allows the user to enter the type of machine and the production date and by hiting ''OK'' the 3 indicators (availability, quality, performance) are calculated via a program in VBA excel. My Main objective is to create a dashboard that shows all these indicators plus the OEE for the type of machine selected by the user in a specific month I have created a worksheet for each machine containing in each column (the Month of the year the specific date, quality indicator, availability and performance and OEE) and by side there is a button that shows us a userform to select the week desired to calculate these indicators and there it goes my issue:
I'm trying to connect the userform before that calculate the indicators with this one that allows us to chose the week to fill the table for each machine with their indicators. How can I do that?

MS Access manual Auto incrementing field

Im building a system for my company to keep track of internal orders, inbetween our warehouses, we have material that goes out warehouse 1 to warehouse 2 and we kind of lose track of how much of "x" is in warehouse 1 and how much in warehouse 2, so i want to implement this access db where a user fills a form and says: order 1: 500 of "x" order 2: 300 of "y". then another user fills an exit form where he says 1 of "x" going out, so i would need the program to keep track of total order and how much as gone out to fill order 1 and so on...
My idea here is to have both an order number and an id number for each of "x" everytime someoneone assembles 1 "x" they fill the form and print a label directly from the access (i have this part working already) while keeping a record of when it was assembled, who verified and what was verified (it will work as a quality control also).
What i dont know is how to program the db so when it reaches 500 of "x", the id number for "x" starts again from 1
This is the one major issue with my program right now, i'm not experienced in access db's or vba, but im getting there with a tip and a trick from here and there, so, no need to be careful with the technical language, i will google it if i have to :p
EDIT:
The table structure goes as follows:
1 table as the main table where I record the check that is made for every product, where I include the model of the product, the said ID that I want to reset after a number of products checked, and a concatenated field that includes most of this information to generate a qr code.
Then there is a table for the Order Number, which is connected to a form to record each new order with a date/time field, the order number itself and the number of products. This number of products must then be called from the code that will count how many products have been checked to date and keep the order number field updated so we can keep track of the order.
Then there is another minor table just to get values for the form, the product models
Thank you for your answers ;)
See this MSDN Documentation
Unfortunately in Access, you cannot 'reset' an ID field, unless you move the records to a newly created table and use that table for every 500 records.
As for the user control and login form, I'm afraid those are separate questions that must be asked in a different thread.
To get you started:
You can set the RecordSource of a form to a table, and when users make entries, the data will be saved to the table. You can also use a form with controls (text boxes, comboboxes, etc.) and create a button that runs a query to insert these records into a table.
The login piece - you can encrypt the database with a password. That may/may not be sufficient.
I would suggest you change your schema, if possible. Something like the following:
Orders
OrderID (Autonumber)
ProductID (link to your Products table)
QuantityRequested
Deliverables
DeliverableID (Autonumber)
OrderID (link to your Orders table)
SequenceNumber: in the BeforeInsert event set this value equal to:
DCount("*", "Deliverables", "OrderID=" & Me.OrderID) + 1
I'm assuming that your form has a control named OrderID that is bound to the OrderID field of the Deliverables table.
The code uses the DCount() function to get the count of all the other deliverables that have already been created for this order. If this is the first deliverable, DCount() will return 0. It then adds 1 to this count to get the sequence number of the next deliverable.
If the new SequenceNumber is greater than the quantity requested, you could display a message saying that the order has been filled and cancel the creation of the Deliverable record.
This is just one approach and it is not a complete solution. I'm assuming that once assigned a sequence number a deliverable cannot be deleted. You might need to make allowances for deliverables that get lost or damaged. You could incorporate a status field to the Deliverable table to deal with this, but you would still need to make a decision about what to do with the SequenceNumber.

Recurring Orders

Hi everyone I'm working on a school project, and for my project I chose to create an ecommerce system that can process recurring orders. This is for my final project, I'll be graduating in May with an associates in computer science.
Keep in mind this is no where a final solution and it's basically a jumping off point for this database design.
A little background on the business processes.
- Customer will order a product, and will specify during checkout whether it is a one time order or a weekly/monthly order.
- Customer will specify a location in which to pick up their order (this location is specific only to the order)
- If the value of the order > 25.00 then it is accepted otherwise it is rejected.
- This will populate the orders_test and order_products_test tables respectively
Person on the back end will have a report generated for deliveries for the day based on these two tables.
They will be able to print it off and it will generate a list of what items go to what location.
Based on the following criteria.
date_of_next_scheduled_delivery = current date
remaining_deliveries > 0
Once they are satisfied with the delivery list they will press "Process Deliveries" button.
This will adjust the order_products_test table as follows
Subtract 1 from remaining_deliveries
Insert current date into date_of_last_delivery_processed
Based on delivery_frequency (i.e. once, weekly, monthly) it will change the date_of_next_scheduled_delivery
status values in the order_products_test table can either be active, hold, or canceled, expired
I just would like some opinions if I am approaching this correctly or if I should scratch this approach and start over again.
A few thoughts, though not necessarily complete (there's a lot to your question, but hopefully these points help):
I don't think you need to keep track of remaining deliveries. You only have 2 options - a one time order, or a recurring order. In both cases, there's no sense in calculating remaining deliveries. It's never leveraged.
In terms of tracking the next delivery date, you can just keep track of the day of the order. If it's recurring -- monthly or weekly, regardless -- everything is calculable from that first date. Most DB systems (MySQL, SQL Server, Oracle, etc) support more than enough date computation flexibility so that you can calculate this on the fly, as opposed to maintaining such a known schedule.
If the delivery location is only specific to the order, I see no use in creating a separate table for it -- it's functionally dependent on the order, you should keep it in the same table as the order. For most e-commerce systems, this is not the case because they tend to associate a list of delivery locations with accounts, which they prompt you about when you order more than once (e.g., Amazon).
Given the above, I bet you can just get away with 2 of your 4 tables above -- Account and Order. But again, if delivery locations are associated with Accounts, I would indeed break that out. (but your question above doesn't suggest that)
Do not name your tables with a "_test" suffix -- it's confusing.