cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

S4HANA Cloud - form title doesn't show in page 3 and so on.

MinhTriLe
Participant
0 Likes
563

Hi,

The problem is if PDF files have more than 2 pages, the title doesn't show in page 3 and so on.

The master form template has 1 pageSet which contains 2 pages - mst1 and mst2.

I've checked the standard logic in txtPrintFormTitleText under frmHiddenGlobalFields in content form template.

	//Set title on first page (always available)
	xfa.resolveNode("#pageSet[0].mst1.FirstPage.frmHeader.txtTitle") = form_title
	
	//Set title on subsequent pages (if available)
	var pageCount = xfa.layout.pageCount();

	if (pageCount > "1")
	then
		xfa.resolveNode("#pageSet[0].mst2.SubsequentPage.frmHeader.txtTitle") = form_title
	endif

 But I couldn't find any problem in the code.

Has anyone seen this behaviour before?

Regards,

Tri

Accepted Solutions (0)

Answers (1)

Answers (1)

HenrikeGrtecke
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello,

Thank you very much for your question.

Here's information that might help you:

Maintain Form Templates

Can you please check the following:

  1. Check Page Count Logic: Ensure that the pageCount variable is correctly capturing the total number of pages. You might want to add debugging statements to verify the value of pageCount.

  2. Verify Page References: Double-check that the references to mst1 and mst2 are correct and that these pages are properly defined in your master form template.

  3. Script Execution: Ensure that the script is executing at the right time. Sometimes, scripts may not run as expected due to timing issues in the form’s lifecycle.

  4. Master Form Template: Confirm that the master form template is correctly set up to handle multiple pages. The template should Manage Your SAP S/4HANA Cloud Public Edition - Master Form Templates have definitions for both mst1 and mst2 pages.

  5. Form Title Binding: Verify that the form_title variable is correctly populated and bound to the text field in the header.

Kind regards,

Henrike