# Sample Request, Development and Approval Tracking App

> A custom app that creates customer sample requests in SAP as sales inquiries and moves every colour or design item through lab, colour approval, design approval, cost approval, sample production and customer approval steps. The worklist shows who holds each step and for how many days; an approved sample is turned directly into a quotation or order.

- Type: Program, Custom development, Fiori app
- Module: PP
- Estimated effort: L (12–18 working days)
- Industry: Textile and Apparel
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/sample-request-development-and-approval-tracking-app/


## Why is the standard not enough?

VA11 creates the sales inquiry, but it does not track which development step a sample is in, whose approval it waits for or how long the step has taken. Sample tracking usually runs on email and Excel lists, and the approved colour and cost information gets lost on the way to the order. The app keeps the whole flow on the SAP document with authorized step transitions.

### Closest standard alternatives

- VA11: Creates the sales inquiry; no development steps, approval sequence or waiting time tracking.
- VA15: Lists inquiries; does not provide a worklist by step and days waiting.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| VBAK | Sample request header: customer, sales organization, requested date | Write | - | ECC + S/4 |
| VBAP | Sample item: quality, colour/design description, quantity, status object | Write | VBAP-VBELN = VBAK-VBELN | ECC + S/4 |
| JEST | Active user status of the item (development step) | Write | JEST-OBJNR = VBAP-OBJNR | ECC + S/4 |
| JCDS | Date and user of step changes (waiting time) | Read | JCDS-OBJNR = VBAP-OBJNR AND JCDS-STAT = JEST-STAT | ECC + S/4 |
| TJ30T | User status (step) names | Read | TJ30T-ESTAT = JEST-STAT | ECC + S/4 |
| KNA1 | Customer name | Read | KNA1-KUNNR = VBAK-KUNNR | ECC + S/4 |
| AFKO | Sample production order | Write | - | ECC + S/4 |

## BAPIs and functions used

- BAPI_INQUIRY_CREATEFROMDATA2: Creates the sample request as a sales inquiry
- STATUS_CHANGE_EXTERN: Changes the development step (user status) of the item
- BAPI_PRODORD_CREATE: Creates a production order for the sample

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_VKORG | Sales organization | Range / multiple | VBAK-VKORG | Yes |
| S_KUNNR | Customer | Range / multiple | VBAK-KUNNR | No |
| S_ERDAT | Request date | Range / multiple | VBAK-ERDAT | No |
| S_ESTAT | Development step | Range / multiple | TJ30T-ESTAT | No |
| P_MINE | Only items waiting for my approval | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Customer | VBAK-KUNNR | Yes |
| Quality | VBAP-MATNR | Yes |
| Colour / design description | VBAP-ARKTX | Yes |
| Colour reference | Colour code or swatch number given by the customer | No |
| Sample quantity | VBAP-KWMENG | Yes |
| Requested date | VBAK-VDATU | No |

## Result list columns

| Column | Source |
|---|---|
| Sample request | VBAK-VBELN |
| Item | VBAP-POSNR |
| Customer | KNA1-NAME1 |
| Quality | VBAP-MATNR |
| Colour / design | VBAP-ARKTX |
| Current step | TJ30T-TXT30 |
| Step started | JCDS-UDATE |
| Days waiting | Calculated: Today − step started |
| Requested date | VBAK-VDATU |
| Status | Calculated: On time, at risk or overdue |

## How does the program work?

1. The customer representative enters customer, quality, colour reference, quantity and requested date in the app; BAPI_INQUIRY_CREATEFROMDATA2 creates an inquiry (VBAK/VBAP) with a sales document type reserved for samples. Each item is one colour or design variant.
2. The steps are tracked with a user status profile assigned to the sales document item (TJ30T): request received → lab dip → colour approval → design approval → cost approval → sample production → customer approval or rejection.
3. Each step change is written to the item object (VBAP-OBJNR) with STATUS_CHANGE_EXTERN; who changed it and when is kept automatically in JCDS. A user can only move the step they are authorized for (B_USERSTAT).
4. At the cost approval step the estimated cost per metre and the target price are kept in the item's pricing conditions; if the margin is below the threshold, the step goes to the sales manager for approval.
5. If a sample has to be produced, the app creates a sample production order with BAPI_PRODORD_CREATE and links the order number to the item.
6. The worklist shows the user's pending steps, days waiting and requested date; overdue items are marked red and the next approver receives an email. After customer approval the inquiry is copied with reference into a quotation (VA21) or order (VA01).

## Authorization objects

- V_VBAK_AAT: Create and change authorization by the sample sales document type
- B_USERSTAT: Who may set which step in the status profile

## Frequently asked questions

### Why use a sales inquiry instead of a separate table?

The inquiry is part of the standard document flow: an approved sample is copied with reference into a quotation and order, so customer and price data are not entered again. The status history is also kept in standard change records, so no separate data model is needed.

### Where are lab dip results and photos kept?

Spectrophotometer values and photos are added to the item as attachments (object services). If required, measurement results from the lab system can be attached automatically; that integration is estimated separately.

### Does it work on S/4HANA?

Yes. The inquiry, user status and production order BAPIs are the same on S/4HANA. The front end is built as a SAPUI5/Fiori app and added to the Fiori launchpad.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=pp-sample-development-approval
