
In SAP S/4HANA Cloud Public Edition, the standard Picking List output generated from a delivery document does not include any text types. For some that is exactly how they want it, for others, it is not. Having recently supported a partner that had this very question, we will in this blog show you how you can add Text Types (that may have been entered in the sales order and copied in the delivery, or directly maintained in the delivery) to the pick list output. However, once you have made the necessary changes to be able to print text types on the pick list, your next conundrum might be that you want to be selective with what gets printed. I.e, as this is a Pick List, you may only want to print the Pick/Pack text types and none of the other text types. We will show you this as well. Furthermore, this second part is something that you can for example, also apply to other SD output documents such as the Sales Order Confirmation, or Delivery Notification to name a couple.
As with many applications, you can in Sales related processes capture or copy a variety of texts in your documents. The texts could represent Internal comments regarding how to handle interactions with a particular customer, specific packing instructions, or comments or instructions that a customer may have conveyed to the sales representative whilst placing their order.
Such texts can be captured at the header and/or item level of a sales document and categorized by text type depending on the nature of the note or comment (i.e is it a shipping-related instruction, an internal note, or is it a note to contact someone in particular in order to arrange a delivery time), as shown below.
These texts can then be printed on various documents. As shown below, we can see the texts that we maintained in our sales order have been printed on the order confirmation output, destined for the customer. That said we can also see that internal notes and comments have been printed on the document. Is this desired?
Whilst these comments have been captured in the sales order, some of them only really have a use in a follow-on document. For example, knowing that the customer has specifically requested for a given item to be double-packed with a specific tape, is information that should be passed to the delivery document, for the warehouse personnel to take note of and action.
As such, we can see in the follow on delivery document from our sales order, that some text types are available here again at the header and/or item level of the delivery. We can also note that -some- of the text types maintained in the sales order have been automatically copied into the delivery document.
And if we look at the outputs that were generated for the delivery we can see:
The delivery note exhibits header and item texts, but you could again ask the question, are all these printed texts desirable on this form?
The delivery pick list, on the other hand, is quite bare - none of the text types have been printed on the document. What if you wanted to convey to the warehouse-specific picking or delivery preparation instructions?
So now that we have set the scene, let's try and answer these two questions:
Because there is already ample information available on the internet, we will not go into great detail as to the preparatory steps required to get started, but we will merely highlight them below, and they are.
I've made some basic design changes in PowerPoint to model what I want the changes to look like and below is what I will aim for - the text type nested with the corresponding delivery item.
I go to LiveCycle Designer (ALD from here on), where I have already opened my saved Pick List and Delivery Note forms. As said previously, the Delivery Note already has those texts, so let's open this one up first to see how it is done there.
In the Delivery Note form, the Text Types are provided in the element named 'rowRemarkRow_3'. We can see a couple of sub-forms and finally the two elements that provide the 'Text Type Description' (eg: Pick / Pack Instructions) and the 'Text Content' (i.e the text we have maintained and want to see printed).
Whilst selecting the element 'rowRemarkRow_3' and showing the form scripts, we see the below:
Go ahead and have a look at that code. Essentially what it does is, it validates the data passed to it and checks if the text type contains any content or is Null (no need to take up real estate space if there is nothing to print!). You can also check the bindings to see how the field you see on screen is bound to the field in the service (data) that serves this form.
Let's get stuck in, and make our saved pick list form the active document. From my mockup, I have located where I will need to amend the Pick List form and insert the text types. The blue arrows show where my modification will be inserted.
Whilst the exact steps taken are not part of the blog, I have amended the form as shown below. Note that at this point I have not inserted the fields that will actually hold the text type information. I have merely created a placeholder if you like, of where I will insert them. Also note the names I have given to my elements such as 'rowRemarkRow_3', 'frmWrapper' and 'frmRepeatingSubform' which are identical to how they are named in the Delivery Note - it will be clearer later on why I did this!
We now pivot to the 'Data View' tab and locate the fields that provide the Text Type information to the form (which again are the same as those we had in the delivery note form). There we can simply 'Drag and Drop' the required fields ('TextElementDescription' and 'TextElementText' ) into our placeholder.
At this point, your form might look something like this - noting the binding and making sure that the elements you inserted are correctly nested in the repeating Sub Form! (Hierarchy view on the left).
Continue to design or amend your form as required. At this point mine looks like this.
We also need to add the script to the form to validate that text has been passed to the form in the first place! I.e there is no need to take up the space on the form if no text is to be printed. So like in the Delivery Note, we select the element named 'rowRemarkRow_3', and in the form script pane, we select 'validate' from the drop-down and insert this code (or if you adjusted your form as I did to resemble the delivery note, you can simply copy/paste the code from the delivery note form - and hopefully explains why I named my elements like in the delivery note!). The script can be maintained in FormCalc or Javascript. I chose the former.
If ( Form.bdyMain.frmTableBlock.tblRemarkRowTable.rowItem.tblInnerTable.rowRemarkRow_3.frmWrapper.frmRepeatingSubform.txtTextElementText.isNull
or Form.bdyMain.frmTableBlock.tblRemarkRowTable.rowItem.tblInnerTable.rowRemarkRow_3.frmWrapper.frmRepeatingSubform.txtTextElementText.rawValue == "" )
then
this.presence = "inactive"
endif;
You can now save your form and upload it into SAP S/4HANA Cloud as a custom template. Again we will not be showing these steps as ample information exists on the internet, but essentially:
Once this is done, we need to (re)generate the relevant output. So we go back to the outbound delivery, and we create a new output (not a copy - a new output) of the Pick List.
And voila! We now have Texts showing on the Pick List.
That said, we are not quite finished, if you recall, we also wanted to be selective with what we printed. For example, the Material sales text has no business being on the pick list, so we need to make another change to our form.
However, before we jump in to make the change, we need to know what the text type codes are that we want to see or not. There are a couple of ways you can do this.
First method, is to go to the sales order (Fiori app) for example, and you might have noticed a code next to the text type, as shown below.
In this case, we are lucky in that the text types we are interested in, TX07 and TX17 exist in the sales order and delivery. But, there could be a case where a text type is specific to an object. So in this case we could also have used an SSCUI such as 106230 - Setup Text Determination by Delivery item, to hunt down this information.
Now we know we want to restrict the Text types to TX07 and TX17, we go back to ADL to implement our next change.
In ADL, we will first add the field that actually holds the code of the text type (eg: TX17), and that field is the field TextElement. Like before, drag and drop the TextElement Field from the Data View to your form and make sure it is also nested in the Repeating sub-form.
Arrange the form as required (hiding the field as it serves no business purpose), and naming it 'txtTextElement' as I have done.
We then select the element where we want to implement the code that will filter these text types.
In my case, and if you have followed along, we select the element named 'frmRepeatingSubform' and again add a Validate statement.
The code I added should be self-explanatory, but will essentially test the text type and only print it if it is TX07 or TX17. My added code is as below.
// Hide field if the Text type is not of type TX07 or TX17
if (this.txtTextElement.rawValue <> "TX07" and this.txtTextElement.rawValue <> "TX17" )
then
this.presence = "inactive";
endif
1; //returns true for validation
Note that the field I am testing is TextElement and not TextElementDescription or TextEmentText which are the fields actually printed on the form. TextElement holds the text type code (you could also for testing have added that field to your form and made it visible).
Once again, we save our form and upload it to the system to update our custom template and re-generate a new pick list output from the delivery to check the effect of our changes.
As we can see the Material Sales Text no longer appears as its text type does not correspond to one of the values we are validating against (TX07 or TX17).
Hopefully, this blog is useful to you and as I said is not limited in use to the outbound delivery Pick List output. You could also use this method for the delivery notification or order confirmation (to filter the text types).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
9 | |
8 | |
4 | |
4 | |
4 | |
4 | |
4 | |
4 | |
4 |