This is for the process of adding Batch Line Items using the Membership No. search with Campaign code.
On the Contact record we have the field "Membership No.". This Membership Number is assigned to all contacts bases on the logic explained in this article
On the Campaign record, there is a field call "Campaign Code". This has to be assigned manually while creating the campaign as shown below.
While Creating a Campaign after navigating to the Campaign tab and Selecting the 'New' button
The details of the campaign need to be entered. This is where the Campaign code is defined:

When doing batch entry for a batch entry line, in membership no. field (outlined in red below) If the campaign code is combined with the membership number with a "-" separator:
Then the membership number will be used to bring contact details and the campaign will be assigned.
This has to be specifically in this format. E.g 00000240-DE
Only then it autopopulates the contact details and campaign.
Please note that after it the membership number is only left i.e just the 00000240 without the DE(campaign code)
Therefore it is essential that this is passed in the correct format - using the membership no. field from contact and campaign code field from campaign.
If doing a manual upload i.e (dataloading) for contact and campaign you would need to load/maintain correct data into these two fields.
This is usually used for barcode use (bulk entry) in Batch entry as explained in 3.2 "Membership No. Search with Campaign": https://help.payments2us.com/en_US/batch-entry/using-batch-entry#3-adding-batch-line-items-2